This changes
r = ...;
if (r < 0)
to
if (... < 0)
when r will not be used again.
if (prctl(PR_SET_KEEPCAPS, 1) < 0)
return log_error_errno(errno, "Failed to enable keep capabilities flag: %m");
- r = setresuid(uid, uid, uid);
- if (r < 0)
+ if (setresuid(uid, uid, uid) < 0)
return log_error_errno(errno, "Failed to change user ID: %m");
if (prctl(PR_SET_KEEPCAPS, 0) < 0)
static int lookup_block_device(const char *p, dev_t *dev) {
struct stat st;
- int r;
assert(p);
assert(dev);
- r = stat(p, &st);
- if (r < 0)
+ if (stat(p, &st) < 0)
return log_warning_errno(errno, "Couldn't stat device %s: %m", p);
if (S_ISBLK(st.st_mode))