Преглед изворни кода

- fixed 64bits compiling: sizeof() returns long type!

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@3932 689a6050-402a-0410-94f2-e92a70836424
Bogdan-Andrei Iancu пре 17 година
родитељ
комит
0f5ce5c0e5
1 измењених фајлова са 6 додато и 3 уклоњено
  1. 6 3
      lib/srdb1/db_res.c

+ 6 - 3
lib/srdb1/db_res.c

@@ -107,7 +107,8 @@ inline db_res_t* db_new_result(void)
 		LM_ERR("no private memory left\n");
 		return 0;
 	}
-	LM_DBG("allocate %d bytes for result set at %p\n", sizeof(db_res_t), r);
+	LM_DBG("allocate %d bytes for result set at %p\n",
+		(int)sizeof(db_res_t), r);
 	memset(r, 0, sizeof(db_res_t));
 	return r;
 }
@@ -142,7 +143,8 @@ inline int db_allocate_columns(db_res_t* _r, const unsigned int cols)
 		LM_ERR("no private memory left\n");
 		return -1;
 	}
-	LM_DBG("allocate %d bytes for result names at %p\n", sizeof(db_key_t) * cols,
+	LM_DBG("allocate %d bytes for result names at %p\n",
+		(int)(sizeof(db_key_t) * cols),
 		RES_NAMES(_r));
 
 	RES_TYPES(_r) = (db_type_t*)pkg_malloc(sizeof(db_type_t) * cols);
@@ -151,7 +153,8 @@ inline int db_allocate_columns(db_res_t* _r, const unsigned int cols)
 		pkg_free(RES_NAMES(_r));
 		return -1;
 	}
-	LM_DBG("allocate %d bytes for result types at %p\n", sizeof(db_type_t) * cols,
+	LM_DBG("allocate %d bytes for result types at %p\n",
+		(int)(sizeof(db_type_t) * cols),
 		RES_TYPES(_r));
 
 	return 0;