Skip to contentSkip to conversation

policycoreutils/setfiles: Drop unused nerr variable

PATCH In review Petr Lautrbach 2 participants 3 messages Feb 1, 2021 – Feb 3, 2021 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 policycoreutils/setfiles: Drop unused nerr variable

---
 policycoreutils/setfiles/setfiles.c | 5 -----
 1 file changed, 5 deletions(-)
policycoreutils/setfiles/setfiles.c +0 -5
index 92616571ef2a..f018d161aa9e 100644
@@ -19,7 +19,6 @@ static int warn_no_match;
 static int null_terminated;
 static int request_digest;
 static struct restore_opts r_opts;
-static int nerr;
 
 #define STAT_BLOCK_SIZE 1
 
@@ -161,7 +160,6 @@ int main(int argc, char **argv)
 	warn_no_match = 0;
 	request_digest = 0;
 	policyfile = NULL;
-	nerr = 0;
 
 	r_opts.abort_on_error = 0;
 	r_opts.progname = strdup(argv[0]);
@@ -427,9 +425,6 @@ int main(int argc, char **argv)
 	r_opts.selabel_opt_digest = (request_digest ? (char *)1 : NULL);
 	r_opts.selabel_opt_path = altpath;
 
-	if (nerr)
-		exit(-1);
-
 	restore_init(&r_opts);
 
 	if (use_input_file) {
Signature · 1 line
2.30.0
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Petr Lautrbach

Thanks!
Nicolas

Quoted 37 lines
---
 policycoreutils/setfiles/setfiles.c | 5 -----
 1 file changed, 5 deletions(-)
policycoreutils/setfiles/setfiles.c +0 -6
index 92616571ef2a..f018d161aa9e 100644
@@ -19,7 +19,6 @@ static int warn_no_match;
 static int null_terminated;
 static int request_digest;
 static struct restore_opts r_opts;
-static int nerr;
 
 #define STAT_BLOCK_SIZE 1
 
@@ -161,7 +160,6 @@ int main(int argc, char **argv)
        warn_no_match = 0;
        request_digest = 0;
        policyfile = NULL;
-       nerr = 0;
 
        r_opts.abort_on_error = 0;
        r_opts.progname = strdup(argv[0]);
@@ -427,9 +425,6 @@ int main(int argc, char **argv)
        r_opts.selabel_opt_digest = (request_digest ? (char *)1 : NULL);
        r_opts.selabel_opt_path = altpath;
 
-       if (nerr)
-               exit(-1);
-
        restore_init(&r_opts);
 
        if (use_input_file) {
--

2.30.0

#2 lore raw
Quoted 6 lines · Nicolas Iooss
Quoted 3 lines · Petr Lautrbach

Merged.

Quoted 39 lines

Thanks!
Nicolas

Quoted 37 lines
---
 policycoreutils/setfiles/setfiles.c | 5 -----
 1 file changed, 5 deletions(-)
policycoreutils/setfiles/setfiles.c +0 -6
index 92616571ef2a..f018d161aa9e 100644
@@ -19,7 +19,6 @@ static int warn_no_match;
 static int null_terminated;
 static int request_digest;
 static struct restore_opts r_opts;
-static int nerr;
 
 #define STAT_BLOCK_SIZE 1
 
@@ -161,7 +160,6 @@ int main(int argc, char **argv)
        warn_no_match = 0;
        request_digest = 0;
        policyfile = NULL;
-       nerr = 0;
 
        r_opts.abort_on_error = 0;
        r_opts.progname = strdup(argv[0]);
@@ -427,9 +425,6 @@ int main(int argc, char **argv)
        r_opts.selabel_opt_digest = (request_digest ? (char *)1 : NULL);
        r_opts.selabel_opt_path = altpath;
 
-       if (nerr)
-               exit(-1);
-
        restore_init(&r_opts);
 
        if (use_input_file) {
--

2.30.0