Changeset 55b2de8 for commands.c


Ignore:
Timestamp:
May 12, 2011, 4:39:26 PM (14 years ago)
Author:
David Benjamin <davidben@mit.edu>
Children:
7fd0bf7
Parents:
13ee8f2
git-author:
David Benjamin <davidben@mit.edu> (05/07/11 15:12:09)
git-committer:
David Benjamin <davidben@mit.edu> (05/12/11 16:39:26)
Message:
Remove NULL checks before calling g_free

g_free handles the NULL check for us.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    rc809f5e r55b2de8  
    12881288  }
    12891289  owl_function_nextmsg_full(filter, skip_deleted, last_if_none);
    1290   if (filter) g_free(filter);
     1290  g_free(filter);
    12911291  return(NULL);
    12921292}
     
    13181318  }
    13191319  owl_function_prevmsg_full(filter, skip_deleted, first_if_none);
    1320   if (filter) g_free(filter);
     1320  g_free(filter);
    13211321  return(NULL);
    13221322}
     
    16911691  commands = g_strsplit_set(newbuff, ";", 0);
    16921692  for (i = 0; commands[i] != NULL; i++) {
    1693     if (lastrv) {
    1694       g_free(lastrv);
    1695     }
     1693    g_free(lastrv);
    16961694    lastrv = owl_function_command(commands[i]);
    16971695  }
Note: See TracChangeset for help on using the changeset viewer.