IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 6, 2006, 3:23:03 PM (20 years ago)
Author:
jhoblitt
Message:

change psDBMySQLToPType() to return 0 instead of -1 to return an error as enums are unsigned

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/db/psDB.c

    r8758 r8759  
    1212 *  @author Joshua Hoblitt
    1313 *
    14  *  @version $Revision: 1.90 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2006-09-07 01:00:46 $
     14 *  @version $Revision: 1.91 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2006-09-07 01:23:03 $
    1616 *
    1717 *  Copyright (C) 2005-2006  Joshua Hoblitt, University of Hawaii
     
    654654        // find ptype of column
    655655        pType = psDBMySQLToPType(field[i].type, field[i].flags);
    656         if (pType < 0) {
     656        if (!pType) {
    657657            psError(PS_ERR_UNKNOWN, false, "Failed to lookup type.");
    658658            psFree(table);
     
    981981            // lookup MySQL column type
    982982            pType = psDBMySQLToPType(field[i].type, field[i].flags);
    983             if (pType < 0) {
     983            if (!pType) {
    984984                psError(PS_ERR_UNKNOWN, false, "Failed to lookup type.");
    985985                psFree(md);
     
    16921692    if (!sqlType) {
    16931693        psError(PS_ERR_UNEXPECTED_NULL, true, "type lookup failed.");
    1694         return -1;
     1694        return 0;
    16951695    }
    16961696
     
    17121712        psError(PS_ERR_UNEXPECTED_NULL, true, "type lookup failed.");
    17131713
    1714         return -1;
     1714        return 0;
    17151715    }
    17161716
Note: See TracChangeset for help on using the changeset viewer.