confile: sig_num()

parent 180abbc0
...@@ -1479,14 +1479,12 @@ static int config_autodev(const char *key, const char *value, ...@@ -1479,14 +1479,12 @@ static int config_autodev(const char *key, const char *value,
static int sig_num(const char *sig) static int sig_num(const char *sig)
{ {
int n; unsigned int signum;
char *endp = NULL;
errno = 0; if (lxc_safe_uint(sig, &signum) < 0)
n = strtol(sig, &endp, 10);
if (sig == endp || n < 0 || errno != 0)
return -1; return -1;
return n;
return signum;
} }
static int rt_sig_num(const char *signame) static int rt_sig_num(const char *signame)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment