IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 13, 2014, 2:35:55 PM (12 years ago)
Author:
eugene
Message:

use return value in truncate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/relastro/src/launch_region_hosts.c

    r36833 r36871  
    99  for (i = 0; i < regionHosts->Nhosts; i++) {
    1010    char *syncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "meanmags.sync");
    11     truncate (syncfile, 0);
     11    if (truncate (syncfile, 0)) fprintf (stderr, "trouble clearing syncfile %s\n", syncfile);
    1212    free (syncfile);
    1313
    1414    char *fitsfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "meanmags.fits");
    15     truncate (fitsfile, 0);
     15    if (truncate (fitsfile, 0)) fprintf (stderr, "trouble clearing fitsfile %s\n", fitsfile);
    1616    free (fitsfile);
    1717
    1818    char *imsyncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "imagemags.sync");
    19     truncate (imsyncfile, 0);
     19    if (truncate (imsyncfile, 0)) fprintf (stderr, "trouble clearing imsyncfile %s\n", imsyncfile);
    2020    free (imsyncfile);
    2121
    2222    char *imfitsfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "imagemags.fits");
    23     truncate (imfitsfile, 0);
     23    if (truncate (imfitsfile, 0)) fprintf (stderr, "trouble clearing imfitsfile %s\n", imfitsfile);
    2424    free (imfitsfile);
    2525
    2626    char *loopsyncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "loop.sync");
    27     truncate (loopsyncfile, 0);
     27    if (truncate (loopsyncfile, 0)) fprintf (stderr, "trouble clearing loopsyncfile %s\n", loopsyncfile);
    2828    free (loopsyncfile);
    2929  }
Note: See TracChangeset for help on using the changeset viewer.