IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 1, 2006, 2:55:23 PM (20 years ago)
Author:
Paul Price
Message:

Addition of a vast quantity of assertions in public functions. Adopted a policy of using assert() within file-static functions (since they are only called internally, any errors there are problems with the program) and using the PS_ASSERT_WHATEVER() macros within public functions. Cleaned a few things up in the process.

File:
1 edited

Legend:

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

    r7241 r7278  
    6161    psMemSetDeallocator(hdu, (psFreeFunc)hduFree);
    6262
    63     if (! extname || strlen(extname) == 0) {
     63    if (!extname || strlen(extname) == 0) {
    6464        hdu->phu = true;
    6565        hdu->extname = psStringCopy("PHU");
     
    8686                    )
    8787{
    88     assert(hdu);
    89     assert(fits);
     88    PS_ASSERT_PTR_NON_NULL(hdu, false);
     89    PS_ASSERT_PTR_NON_NULL(fits, false);
    9090
    9191    // Move to the appropriate extension
     
    113113              )
    114114{
    115     assert(hdu);
    116     assert(fits);
     115    PS_ASSERT_PTR_NON_NULL(hdu, false);
     116    PS_ASSERT_PTR_NON_NULL(fits, false);
    117117
    118118    // Read the header; includes the move
     
    159159               )
    160160{
    161     assert(hdu);
    162     assert(fits);
     161    PS_ASSERT_PTR_NON_NULL(hdu, false);
     162    PS_ASSERT_PTR_NON_NULL(fits, false);
    163163
    164164    psTrace(__func__, 7, "Writing HDU %s\n", hdu->extname);
Note: See TracChangeset for help on using the changeset viewer.