diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-07-21 17:35:29 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-07-21 17:35:29 +0400 |
commit | fd6c856b34c8fda53b7e45e3dcc17625206ed4fb (patch) | |
tree | b4c8d1c62937038cb39bdcf7879110525fb05480 /src/lua/lua_classifier.c | |
parent | 875d1dd367eb433ae77a092148f483e9b9449a47 (diff) | |
download | rspamd-fd6c856b34c8fda53b7e45e3dcc17625206ed4fb.tar.gz rspamd-fd6c856b34c8fda53b7e45e3dcc17625206ed4fb.zip |
Add workaround for clang under linux.
Fix problems found by static analyzing.
Diffstat (limited to 'src/lua/lua_classifier.c')
-rw-r--r-- | src/lua/lua_classifier.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/lua_classifier.c b/src/lua/lua_classifier.c index 4e868b7f7..82fd4948d 100644 --- a/src/lua/lua_classifier.c +++ b/src/lua/lua_classifier.c @@ -72,7 +72,7 @@ lua_check_classifier (lua_State * L) { void *ud = luaL_checkudata (L, 1, "rspamd{classifier}"); luaL_argcheck (L, ud != NULL, 1, "'classifier' expected"); - return *((struct classifier_config **)ud); + return ud ? *((struct classifier_config **)ud) : NULL; } static GList * @@ -353,7 +353,7 @@ lua_check_statfile (lua_State * L) { void *ud = luaL_checkudata (L, 1, "rspamd{statfile}"); luaL_argcheck (L, ud != NULL, 1, "'statfile' expected"); - return *((struct statfile **)ud); + return ud ? *((struct statfile **)ud) : NULL; } |