Changeset 8427 for trunk/Ohana/src/opihi/lib.data/queues.c
- Timestamp:
- Aug 20, 2006, 5:36:41 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/lib.data/queues.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/lib.data/queues.c
r8190 r8427 232 232 key2 = ChooseKey (queue[0].lines[j], Key); 233 233 if (key2 == NULL) continue; 234 if (strcmp (key1, key2)) { 235 if (Key != -1) free (key2); 236 continue; 237 } 238 found = TRUE; 239 if (Key != -1) free (key2); 234 found = !strcmp (key1, key2); 235 free (key2); 240 236 } 241 237 if (!found) PushQueue (queue, tmp.lines[i]); 242 if (Key != -1)free (key1);238 free (key1); 243 239 } 244 240 for (i = 0; i < tmp.Nlines; i++) { … … 287 283 key2 = ChooseKey (queue[0].lines[j], Key); 288 284 if (key2 == NULL) continue; 289 if (strcmp (key1, key2)) { 290 if (Key != -1) free (key2); 291 continue; 285 found = !strcmp (key1, key2); 286 if (found) { 287 // XXX do I need to free queue[0].lines[j]?? 288 queue[0].lines[j] = strcreate (tmp.lines[i]); 292 289 } 293 queue[0].lines[j] = strcreate (tmp.lines[i]); 294 found = TRUE; 295 if (Key != -1) free (key2); 290 free (key2); 296 291 } 297 292 if (!found) PushQueue (queue, tmp.lines[i]); 298 if (Key != -1)free (key1);293 free (key1); 299 294 } 300 295 for (i = 0; i < tmp.Nlines; i++) {
Note:
See TracChangeset
for help on using the changeset viewer.
