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/pmFPAUtils.c

    r7017 r7278  
    99                 )
    1010{
    11     psArray *chips = fpa->chips;    // Array of chips
     11    PS_ASSERT_PTR_NON_NULL(fpa, -1);
     12    PS_ASSERT_PTR_NON_NULL(name, -1);
     13    if (strlen(name) == 0) {
     14        return -1;
     15    }
     16
     17    psArray *chips = fpa->chips;        // Array of chips
    1218    for (int i = 0; i < chips->n; i++) {
    1319        pmChip *chip = chips->data[i]; // The chip of interest
     
    2733                  )
    2834{
     35    PS_ASSERT_PTR_NON_NULL(chip, -1);
     36    PS_ASSERT_PTR_NON_NULL(name, -1);
     37    if (strlen(name) == 0) {
     38        return -1;
     39    }
     40
    2941    psArray *cells = chip->cells;    // Array of cells
    3042    for (int i = 0; i < cells->n; i++) {
Note: See TracChangeset for help on using the changeset viewer.