diff mbox series

policycoreutils/setfiles: Drop unused nerr variable

Message ID 20210201143206.389547-1-plautrba@redhat.com (mailing list archive)
State Accepted
Headers show
Series policycoreutils/setfiles: Drop unused nerr variable | expand

Commit Message

Petr Lautrbach Feb. 1, 2021, 2:32 p.m. UTC
Suggested-by: Nicolas Iooss <nicolas.iooss@m4x.org>
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
---
 policycoreutils/setfiles/setfiles.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Nicolas Iooss Feb. 1, 2021, 9:55 p.m. UTC | #1
On Mon, Feb 1, 2021 at 3:32 PM Petr Lautrbach <plautrba@redhat.com> wrote:
>
> Suggested-by: Nicolas Iooss <nicolas.iooss@m4x.org>
> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>

Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org>

Thanks!
Nicolas
> ---
>  policycoreutils/setfiles/setfiles.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/policycoreutils/setfiles/setfiles.c b/policycoreutils/setfiles/setfiles.c
> index 92616571ef2a..f018d161aa9e 100644
> --- a/policycoreutils/setfiles/setfiles.c
> +++ b/policycoreutils/setfiles/setfiles.c
> @@ -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
>
Petr Lautrbach Feb. 3, 2021, 8:34 a.m. UTC | #2
Nicolas Iooss <nicolas.iooss@m4x.org> writes:

> On Mon, Feb 1, 2021 at 3:32 PM Petr Lautrbach <plautrba@redhat.com> wrote:
>>
>> Suggested-by: Nicolas Iooss <nicolas.iooss@m4x.org>
>> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
>
> Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org>

Merged.

> Thanks!
> Nicolas
>> ---
>>  policycoreutils/setfiles/setfiles.c | 5 -----
>>  1 file changed, 5 deletions(-)
>>
>> diff --git a/policycoreutils/setfiles/setfiles.c b/policycoreutils/setfiles/setfiles.c
>> index 92616571ef2a..f018d161aa9e 100644
>> --- a/policycoreutils/setfiles/setfiles.c
>> +++ b/policycoreutils/setfiles/setfiles.c
>> @@ -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
>>
diff mbox series

Patch

diff --git a/policycoreutils/setfiles/setfiles.c b/policycoreutils/setfiles/setfiles.c
index 92616571ef2a..f018d161aa9e 100644
--- a/policycoreutils/setfiles/setfiles.c
+++ b/policycoreutils/setfiles/setfiles.c
@@ -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) {