Changeset 2434 for neercs/trunk


Ignore:
Timestamp:
Jun 15, 2008, 8:17:16 PM (12 years ago)
Author:
Pascal Terjan
Message:
  • It's not very useful to check a pointer after dereferencing it
  • It's not very useful to change the value of a parameter before leaving
  • 0 is a valid fd
File:
1 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/screens.c

    r2432 r2434  
    9090int destroy_screen(struct screen *s)
    9191{
    92     if(s->fd>0)
     92    if(s->fd>=0)
    9393        close(s->fd);
    9494    if(s->buf)
     
    100100        cucul_free_canvas(s->cv);
    101101    s->cv = NULL;
    102     if(s)
    103         free(s);
    104     s = NULL;
     102    free(s);
    105103    return 1;
    106104}
Note: See TracChangeset for help on using the changeset viewer.