diff options
author | Hadriel Kaplan <hadrielk@yahoo.com> | 2014-03-21 15:12:55 -0400 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-03-21 19:49:27 +0000 |
commit | 752e545fbf098985512f3188ba73b31b1052ac41 (patch) | |
tree | 9302528839dbd0bc045c8a8826b9ff9e9e66a812 /epan/wslua/wslua_int64.c | |
parent | 51597c17a6a721dbc3d807f0571affd741f59f61 (diff) |
Fix API comments and don't use sprintf in wslua_int64.c
Change-Id: I4997317e010f685d47e1e2ab512b086e54b286a7
Reviewed-on: https://code.wireshark.org/review/777
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/wslua/wslua_int64.c')
-rw-r--r-- | epan/wslua/wslua_int64.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/wslua/wslua_int64.c b/epan/wslua/wslua_int64.c index aa2e3d7b13..d5d5281e7c 100644 --- a/epan/wslua/wslua_int64.c +++ b/epan/wslua/wslua_int64.c @@ -269,7 +269,7 @@ WSLUA_METAMETHOD Int64__tostring(lua_State* L) { /* Converts the Int64 into a string of decimal digits */ gint64 num = getInt64(L,1); gchar s[LUATYPE64_STRING_SIZE]; - if (sprintf(s, "%" G_GINT64_MODIFIER "d", num) < 0) { + if (g_snprintf(s, LUATYPE64_STRING_SIZE, "%" G_GINT64_MODIFIER "d", num) < 0) { return luaL_error(L, "Error writing Int64 to a string"); } lua_pushstring(L,s); @@ -383,19 +383,19 @@ WSLUA_METHOD Int64_bnot(lua_State* L) { return 1 WSLUA_METHOD Int64_band(lua_State* L) { - /* Returns a Int64 of the bitwise 'and' operation, with the given number/Int64/UIn64. Note that multiple arguments are allowed. */ + /* Returns a Int64 of the bitwise 'and' operation, with the given number/Int64/UInt64. Note that multiple arguments are allowed. */ WSLUA_BIT_OP_FUNC(Int64,&=); WSLUA_RETURN(1); /* The Int64 object */ } WSLUA_METHOD Int64_bor(lua_State* L) { - /* Returns a Int64 of the bitwise 'or' operation, with the given number/Int64/UIn64. Note that multiple arguments are allowed. */ + /* Returns a Int64 of the bitwise 'or' operation, with the given number/Int64/UInt64. Note that multiple arguments are allowed. */ WSLUA_BIT_OP_FUNC(Int64,|=); WSLUA_RETURN(1); /* The Int64 object */ } WSLUA_METHOD Int64_bxor(lua_State* L) { - /* Returns a Int64 of the bitwise 'xor' operation, with the given number/Int64/UIn64. Note that multiple arguments are allowed. */ + /* Returns a Int64 of the bitwise 'xor' operation, with the given number/Int64/UInt64. Note that multiple arguments are allowed. */ WSLUA_BIT_OP_FUNC(Int64,^=); WSLUA_RETURN(1); /* The Int64 object */ } @@ -678,7 +678,7 @@ WSLUA_METAMETHOD UInt64__tostring(lua_State* L) { /* Converts the UInt64 into a string */ guint64 num = getUInt64(L,1); gchar s[LUATYPE64_STRING_SIZE]; - if (sprintf(s, "%" G_GINT64_MODIFIER "u",(guint64)num) < 0) { + if (g_snprintf(s, LUATYPE64_STRING_SIZE, "%" G_GINT64_MODIFIER "u",(guint64)num) < 0) { return luaL_error(L, "Error writing UInt64 to a string"); } lua_pushstring(L,s); @@ -817,19 +817,19 @@ WSLUA_METHOD UInt64_bnot(lua_State* L) { } WSLUA_METHOD UInt64_band(lua_State* L) { - /* Returns a UInt64 of the bitwise 'and' operation, with the given number/Int64/UIn64. Note that multiple arguments are allowed. */ + /* Returns a UInt64 of the bitwise 'and' operation, with the given number/Int64/UInt64. Note that multiple arguments are allowed. */ WSLUA_BIT_OP_FUNC(UInt64,&=); WSLUA_RETURN(1); /* The UInt64 object */ } WSLUA_METHOD UInt64_bor(lua_State* L) { - /* Returns a UInt64 of the bitwise 'or' operation, with the given number/Int64/UIn64. Note that multiple arguments are allowed. */ + /* Returns a UInt64 of the bitwise 'or' operation, with the given number/Int64/UInt64. Note that multiple arguments are allowed. */ WSLUA_BIT_OP_FUNC(UInt64,|=); WSLUA_RETURN(1); /* The UInt64 object */ } WSLUA_METHOD UInt64_bxor(lua_State* L) { - /* Returns a UInt64 of the bitwise 'xor' operation, with the given number/Int64/UIn64. Note that multiple arguments are allowed. */ + /* Returns a UInt64 of the bitwise 'xor' operation, with the given number/Int64/UInt64. Note that multiple arguments are allowed. */ WSLUA_BIT_OP_FUNC(UInt64,^=); WSLUA_RETURN(1); /* The UInt64 object */ } |