summaryrefslogtreecommitdiff
path: root/src/basic/cap-list.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-07-09 23:23:07 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-07-10 16:55:24 +0200
commit5700780389ddea40df6abd4f54d32214aaf4a640 (patch)
treef1a5b354a5586d78e77dec205cac4c173b4cbe2c /src/basic/cap-list.c
parent864a25d99bb523e7a5c166771e3ddbf39baffd33 (diff)
downloadsystemd-5700780389ddea40df6abd4f54d32214aaf4a640.tar.gz
basic/cap-list: reduce scope of variables
Diffstat (limited to 'src/basic/cap-list.c')
-rw-r--r--src/basic/cap-list.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/basic/cap-list.c b/src/basic/cap-list.c
index 2b7834ad98..b483833947 100644
--- a/src/basic/cap-list.c
+++ b/src/basic/cap-list.c
@@ -18,7 +18,6 @@ static const struct capability_name* lookup_capability(register const char *str,
#include "cap-to-name.h"
const char *capability_to_name(int id) {
-
if (id < 0)
return NULL;
@@ -94,11 +93,10 @@ int capability_set_to_string_alloc(uint64_t set, char **s) {
int capability_set_from_string(const char *s, uint64_t *set) {
uint64_t val = 0;
- const char *p;
assert(set);
- for (p = s;;) {
+ for (const char *p = s;;) {
_cleanup_free_ char *word = NULL;
int r;