@@ -301,7 +301,7 @@ static int l_sipmysql_escape(lua_State *L)
301301 to = pkg_malloc (2 * len + 1 );
302302 if (!to )
303303 {
304- siplua_log (L_CRIT , "malloc of %lu bytes failed\n" , 2 * len + 1 );
304+ siplua_log (L_CRIT , "malloc of %zu bytes failed\n" , 2 * len + 1 );
305305 lua_pushnil (L );
306306 return 1 ;
307307 }
@@ -369,7 +369,7 @@ static int l_sipmysql_prepare(lua_State *L)
369369 o_stmt -> bind = pkg_malloc (o_stmt -> param_count * sizeof (MYSQL_BIND ));
370370 if (!o_stmt -> bind )
371371 {
372- siplua_log (L_CRIT , "malloc of %lu bytes failed\n" ,
372+ siplua_log (L_CRIT , "malloc of %zu bytes failed\n" ,
373373 o_stmt -> param_count * sizeof (MYSQL_BIND ));
374374 lua_remove (L , -1 );
375375 lua_pushnil (L );
@@ -379,7 +379,7 @@ static int l_sipmysql_prepare(lua_State *L)
379379 o_stmt -> is_null = pkg_malloc (o_stmt -> param_count * sizeof (my_bool ));
380380 if (!o_stmt -> is_null )
381381 {
382- siplua_log (L_CRIT , "malloc of %lu bytes failed\n" ,
382+ siplua_log (L_CRIT , "malloc of %zu bytes failed\n" ,
383383 o_stmt -> param_count * sizeof (my_bool ));
384384 lua_remove (L , -1 );
385385 lua_pushnil (L );
@@ -389,7 +389,7 @@ static int l_sipmysql_prepare(lua_State *L)
389389 o_stmt -> length = pkg_malloc (o_stmt -> param_count * sizeof (unsigned long ));
390390 if (!o_stmt -> length )
391391 {
392- siplua_log (L_CRIT , "malloc of %lu bytes failed\n" ,
392+ siplua_log (L_CRIT , "malloc of %zu bytes failed\n" ,
393393 o_stmt -> param_count * sizeof (unsigned long ));
394394 lua_remove (L , -1 );
395395 lua_pushnil (L );
@@ -411,7 +411,7 @@ static int l_sipmysql_prepare(lua_State *L)
411411 o_stmt -> result = pkg_malloc (o_stmt -> num_fields * sizeof (MYSQL_BIND ));
412412 if (!o_stmt -> result )
413413 {
414- siplua_log (L_CRIT , "malloc of %lu bytes failed\n" ,
414+ siplua_log (L_CRIT , "malloc of %zu bytes failed\n" ,
415415 o_stmt -> num_fields * sizeof (MYSQL_BIND ));
416416 lua_remove (L , -1 );
417417 lua_pushnil (L );
@@ -421,7 +421,7 @@ static int l_sipmysql_prepare(lua_State *L)
421421 o_stmt -> real_length = pkg_malloc (o_stmt -> num_fields * sizeof (unsigned long ));
422422 if (!o_stmt -> real_length )
423423 {
424- siplua_log (L_CRIT , "malloc of %lu bytes failed\n" ,
424+ siplua_log (L_CRIT , "malloc of %zu bytes failed\n" ,
425425 o_stmt -> num_fields * sizeof (unsigned long ));
426426 lua_remove (L , -1 );
427427 lua_pushnil (L );
@@ -578,7 +578,7 @@ static int sipmysql_stmt_bind(struct sipmysql_stmt *o, lua_State *L, int n, int
578578 o -> bind [n ].buffer = pkg_malloc (sizeof (number ));
579579 if (!o -> bind [n ].buffer )
580580 {
581- siplua_log (L_CRIT , "malloc of %lu bytes failed\n" , sizeof (number ));
581+ siplua_log (L_CRIT , "malloc of %zu bytes failed\n" , sizeof (number ));
582582 lua_pushnil (L );
583583 return 1 ;
584584 }
@@ -597,7 +597,7 @@ static int sipmysql_stmt_bind(struct sipmysql_stmt *o, lua_State *L, int n, int
597597 o -> bind [n ].buffer = pkg_malloc (len );
598598 if (!o -> bind [n ].buffer )
599599 {
600- siplua_log (L_CRIT , "malloc of %lu bytes failed\n" , len );
600+ siplua_log (L_CRIT , "malloc of %zu bytes failed\n" , len );
601601 lua_pushnil (L );
602602 return 1 ;
603603 }
0 commit comments