IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26371


Ignore:
Timestamp:
Dec 8, 2009, 7:01:33 PM (16 years ago)
Author:
eugene
Message:

do not free the first list entry

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/lib.shell/ListOps.c

    r25965 r26371  
    33
    44/*** local static variables used to track the command lists  ***/
    5 static List *lists;                     /* variable to store the list of all lists */
    6 static int  Nlists;                     /* number of currently available lists */
     5static List *lists = NULL;      /* variable to store the list of all lists */
     6static int  Nlists = 0;         /* number of currently available lists */
    77
    88void InitLists () {
     
    1616  int i, j;
    1717
    18   for (i = 0; i < Nlists; i++) {
     18  // Nlists is a bit weird: it is the currently highest valid list, not the number of lists
     19  // Nlists = 0 is never allocated
     20  for (i = 1; i < Nlists + 1; i++) {
    1921    for (j = 0; j < lists[i].Nlines; j++) {
    2022      free (lists[i].line[j]);
Note: See TracChangeset for help on using the changeset viewer.