don't pass uninitialized variables to logf

This commit is contained in:
Eric House 2013-06-21 07:26:11 -07:00
parent b1ef09625e
commit 6027c94a43

View file

@ -674,8 +674,15 @@ DBMgr::TokenFor( const char* const connName, int hid, DevIDRelay* devid,
} }
} }
PQclear( result ); PQclear( result );
logf( XW_LOGINFO, "%s(%s,%d)=>%s (%d, %d)", __func__, connName, hid,
(found?"true":"false"), *devid, *token );
if ( found ) {
logf( XW_LOGINFO, "%s(%s,%d)=>true (%d, %d)", __func__, connName, hid,
*devid, *token );
} else {
logf( XW_LOGINFO, "%s(%s,%d)=>false", __func__, connName, hid );
}
return found; return found;
} }