Changeset 9359 for trunk/Ohana/src/opihi/lib.data/queues.c
- Timestamp:
- Oct 6, 2006, 10:28:33 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/lib.data/queues.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/lib.data/queues.c
r9280 r9359 141 141 } 142 142 143 // return a newly allocated string containing the requested key value 143 144 char *ChooseSingleKey (char *line, int Key) { 144 145 … … 146 147 char *key, *p; 147 148 149 if (Key == -1) { 150 key = strcreate (line); 151 return (key); 152 } 153 148 154 key = line; 149 if (Key == -1) return line;150 151 155 for (i = 0; (i < Key) && (key != NULL); i++) { 152 156 p = nextword (key); … … 192 196 first = FALSE; 193 197 } 194 195 198 return (output); 196 199 } … … 337 340 test = ChooseKey (queue[0].lines[i], Key); 338 341 if (test == NULL) continue; 339 if (strcmp (value, test)) continue; 342 if (strcmp (value, test)) { 343 free (test); 344 continue; 345 } 346 free (test); 340 347 choice = i; 341 348 }
Note:
See TracChangeset
for help on using the changeset viewer.
