IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27000


Ignore:
Timestamp:
Feb 18, 2010, 6:18:20 PM (16 years ago)
Author:
Paul Price
Message:

Check return value of psFitsClose.

Location:
trunk/psModules/src/camera
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAfile.c

    r26893 r27000  
    2828    }
    2929
     30    psAssert(file->fits == NULL, "File %s wasn't closed.", file->name);
     31
    3032    psTrace ("pmFPAfileFree", 5, "freeing %s\n", file->name);
    3133    psFree (file->fpa);
     
    4042    psFree (file->name);
    4143
    42     if (file->fits != NULL) {
    43         psFitsClose (file->fits);
    44     }
    4544    psFree(file->compression);
    4645    psFree(file->options);
  • trunk/psModules/src/camera/pmFPAfileDefine.c

    r23370 r27000  
    461461            return NULL;
    462462        }
    463         psFitsClose(fits);
     463        if (!psFitsClose(fits)) {
     464            psError(psErrorCodeLast(), false, "Failed to close file %s", realName);
     465            psFree(realName);
     466            return NULL;
     467        }
    464468
    465469        // Determine the current format from the header; determine camera if not specified already.
     
    541545            }
    542546            phu = psFitsReadHeader(NULL, fits);
    543             psFitsClose(fits);
     547            if (!psFitsClose(fits)) {
     548                psError(psErrorCodeLast(), false, "Failed to close file %s", realName);
     549                psFree(realName);
     550                return NULL;
     551            }
    544552            if (!phu) {
    545553                psError(PS_ERR_IO, false, "Failed to read file header %s", realName);
Note: See TracChangeset for help on using the changeset viewer.