summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-04-01 00:15:25 +0200
committerSébastien Helleu <flashcode@flashtux.org>2019-04-01 00:15:25 +0200
commit5d02ff9a6d28fedead688bc42c9e9619e3708ff2 (patch)
tree09a0d02a7f6952fe7058214671a207f3da2cfb29 /src/core
parentd2571ab53b97b5420f228476fdfb5b97062ebbcf (diff)
downloadweechat-5d02ff9a6d28fedead688bc42c9e9619e3708ff2.zip
tests: add tests on function util_signal_search
Diffstat (limited to 'src/core')
-rw-r--r--src/core/wee-util.c3
-rw-r--r--src/core/wee-util.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/core/wee-util.c b/src/core/wee-util.c
index cd4892a7c..1e4c282f9 100644
--- a/src/core/wee-util.c
+++ b/src/core/wee-util.c
@@ -422,6 +422,9 @@ util_signal_search (const char *name)
{
int i;
+ if (!name)
+ return -1;
+
for (i = 0; util_signals[i].name; i++)
{
if (string_strcasecmp (util_signals[i].name, name) == 0)
diff --git a/src/core/wee-util.h b/src/core/wee-util.h
index 223017f8a..d287a2da0 100644
--- a/src/core/wee-util.h
+++ b/src/core/wee-util.h
@@ -36,6 +36,8 @@ struct t_util_signal
int signal; /* signal number */
};
+extern struct t_util_signal util_signals[];
+
/* limits */
extern void util_setrlimit ();