IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 20, 2006, 5:36:41 PM (20 years ago)
Author:
eugene
Message:

updated to the new DVO APIs; minor cleanups (unused variables, etc)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/lib.data/queues.c

    r8190 r8427  
    232232      key2 = ChooseKey (queue[0].lines[j], Key);
    233233      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);
    240236    }     
    241237    if (!found) PushQueue (queue, tmp.lines[i]);
    242     if (Key != -1) free (key1);
     238    free (key1);
    243239  }
    244240  for (i = 0; i < tmp.Nlines; i++) {
     
    287283      key2 = ChooseKey (queue[0].lines[j], Key);
    288284      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]);
    292289      }
    293       queue[0].lines[j] = strcreate (tmp.lines[i]);
    294       found = TRUE;
    295       if (Key != -1) free (key2);
     290      free (key2);
    296291    }     
    297292    if (!found) PushQueue (queue, tmp.lines[i]);
    298     if (Key != -1) free (key1);
     293    free (key1);
    299294  }
    300295  for (i = 0; i < tmp.Nlines; i++) {
Note: See TracChangeset for help on using the changeset viewer.