diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2014-10-12 22:27:54 +0200 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2014-10-13 19:06:40 +0000 |
commit | b653564fe21c84482d99586b437be1ffcb35459a (patch) | |
tree | 4cc26824d0f23c777a64d267988bb2c1440a66f0 /epan/wslua/wslua_int64.c | |
parent | 9ce5ca581d30074c2c02eca0f51dbe840bf9411b (diff) |
Lua: luaL_checkstring does not return NULL
Removed all checks for NULL strings to cleanup the code.
Change-Id: Ia890cd9b206296f586e85214f07765f14984580b
Reviewed-on: https://code.wireshark.org/review/4632
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'epan/wslua/wslua_int64.c')
-rw-r--r-- | epan/wslua/wslua_int64.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/wslua/wslua_int64.c b/epan/wslua/wslua_int64.c index 4c1a4dc9c2..8cb79b755d 100644 --- a/epan/wslua/wslua_int64.c +++ b/epan/wslua/wslua_int64.c @@ -255,7 +255,7 @@ WSLUA_CONSTRUCTOR Int64_fromhex(lua_State* L) { size_t len = 0; const gchar *s = luaL_checklstring(L,WSLUA_ARG_Int64_fromhex_HEX,&len); - if (s && len > 0) { + if (len > 0) { sscanf(s, "%" G_GINT64_MODIFIER "x", &result); } pushInt64(L,(gint64)result); @@ -815,7 +815,7 @@ WSLUA_CONSTRUCTOR UInt64_fromhex(lua_State* L) { size_t len = 0; const gchar *s = luaL_checklstring(L,WSLUA_ARG_UInt64_fromhex_HEX,&len); - if (s && len > 0) { + if (len > 0) { sscanf(s, "%" G_GINT64_MODIFIER "x", &result); } pushUInt64(L,result); |