IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2821


Ignore:
Timestamp:
Dec 23, 2004, 5:16:14 PM (22 years ago)
Author:
eugene
Message:

closing NULL file ok

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libohana/src/glockfile.c

    r2413 r2821  
    4545}
    4646
     47/* clears lock. removes hardlock even if file pointer is not supplied */
    4748int fclearlockfile (char *filename, FILE *f, int type, int *state) {
    4849
    4950  int fd, status;
    5051
    51   fflush (f);
    52   fd = fileno (f);
     52  fd = -1;
     53  if (f != NULL) {
     54    fflush (f);
     55    fd = fileno (f);
     56  }
    5357  status = clearlockfile2 (filename, fd, type, state);
    54   fclose (f);
     58  if (f != NULL) fclose (f);
    5559  return (status);
    5660}
Note: See TracChangeset for help on using the changeset viewer.