IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 5, 2010, 3:47:36 PM (16 years ago)
Author:
eugene
Message:

pendatic checking fscan, system, and mkstemp return values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.astro/flux.c

    r7917 r27611  
    2929  ymax = 0;
    3030  for (i = 0; i < 4; i++) {
    31     fscanf (f, "%lf %lf", &x[i], &y[i]);
     31    if (fscanf (f, "%lf %lf", &x[i], &y[i]) != 2) {
     32      fprintf (stderr, "error reading coordinates from %s\n", argv[2]);
     33      fclose (f);
     34      return (FALSE);
     35    }
    3236    xmin = MAX (0, MIN (xmin, x[i] - 1));
    3337    ymin = MAX (0, MIN (ymin, y[i] - 1));
Note: See TracChangeset for help on using the changeset viewer.