IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 1, 2008, 8:33:14 AM (18 years ago)
Author:
Paul Price
Message:

Need to check return value of fwrite to avoid compiler warning on some
systems. It's a good thing to do anyway.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSourceIO_SX.c

    r15562 r18845  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2007-11-10 01:09:20 $
     5 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2008-08-01 18:33:14 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6060        pmSource *source = (pmSource *) sources->data[i];
    6161
    62         // no difference between PSF and non-PSF model
     62        // no difference between PSF and non-PSF model
    6363        pmModel *model = pmSourceGetModel (NULL, source);
    6464        if (model == NULL)
     
    7070        // pmSourceSextractType (source, &type, &flags);
    7171
    72         axes = pmPSF_ModelToAxes (PAR, 20.0);
     72        axes = pmPSF_ModelToAxes (PAR, 20.0);
    7373
    7474        psLineInit (line);
     
    8585        psLineAdd (line, "%9.4f",  source->apMag);
    8686        psLineAdd (line, "%4d\n",  0); // should be flags
    87         fwrite (line->line, 1, line->Nline, f);
     87        if (fwrite(line->line, 1, line->Nline, f) < line->Nline) {
     88            psError(PS_ERR_IO, true, "Unable to write SX sources file (%s)", filename);
     89            fclose(f);
     90            psFree(line);
     91            return false;
     92        }
    8893    }
    8994    fclose (f);
Note: See TracChangeset for help on using the changeset viewer.