Unverified Commit 9438b042 by Christian Brauner Committed by Stéphane Graber

confile: sig_num()

parent ae0a8da5
...@@ -1395,14 +1395,12 @@ static int config_autodev(const char *key, const char *value, ...@@ -1395,14 +1395,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