basic/cap-list: reduce scope of variables

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2020-07-10 16:55:24 +02:00
parent 864a25d99b
commit 5700780389
2 changed files with 3 additions and 7 deletions
+1 -3
View File
@@ -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;