Changeset - 3395cf085378
[Not reviewed]
default
0 1 0
ethanzonca@protofusion.org - 16 years ago 2010-02-18 22:46:19
ethanzonca@protofusion.org
Null row check
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/server/mysql.c
Show inline comments
 
@@ -56,12 +56,15 @@ int mysqlResultFree(distrend_mysql_resul
 
/**
 
   reads an integer mysql field value
 
   @return 0 on success
 
*/
 
int distrend_mysql_getint(MYSQL_ROW row, MYSQL_FIELD_OFFSET column, int32_t *theint)
 
{
 

	
 
if(!row[0] || !row[1])
 
  fprintf(stderr, "Rows are null!\n");
 
  *theint = atol(row[column]);
 

	
 
  return 0;
 
}
 

	
 

	
0 comments (0 inline, 0 general)