errno = 0;
ul = strtoul(*p + 4, (char**) p, 10);
- if (errno != 0 || **p != '=' || ul > 256) {
+ if (errno > 0 || **p != '=' || ul > 256) {
r = -EINVAL;
goto fail;
}
return -ENOMEM;
c->path = strdup(path);
- if (!path) {
+ if (!c->path) {
free(c);
return -ENOMEM;
}