IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11841


Ignore:
Timestamp:
Feb 15, 2007, 3:48:16 PM (19 years ago)
Author:
jhoblitt
Message:

remove the use of goto

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/pxadminConfig.c

    r11840 r11841  
    3838    if (!config->modules) {
    3939        psError(PS_ERR_UNKNOWN, false, "Can't find site configuration");
    40         goto FAIL;
     40        psFree(config);
     41        return NULL;
    4142    }
    4243
     
    8081        psArgumentHelp(arguments);
    8182        psFree(arguments);
    82         goto FAIL;
     83        psFree(config);
     84        return NULL;
    8385    }
    8486
     
    8688        psArgumentHelp(arguments);
    8789        psFree(arguments);
    88         goto FAIL;
     90        psFree(config);
     91        return NULL;
    8992    }
    9093
     
    9598        psArgumentHelp(arguments);
    9699        psFree(arguments);
    97         goto FAIL;
     100        psFree(config);
     101        return NULL;
    98102    }
    99103
     
    104108    if (!config->dbh) {
    105109        psError(PS_ERR_UNKNOWN, false, "Can't configure database");
    106         goto FAIL;
     110        psFree(config);
     111        return NULL;
    107112    }
    108113
     
    112117
    113118    return config;
    114 
    115 FAIL:
    116     psFree(config);
    117     return NULL;
    118119}
    119 
    120 /*
    121  * USAGE:
    122  * p2admin -create : create the P2 tables
    123  * p2admin -delete : delete the P2 tables (asks for confirmation)
    124  */
Note: See TracChangeset for help on using the changeset viewer.