diff mbox series

[v2,1/4] libsepol: drop message for uncommon error cases

Message ID 20230602130608.24586-1-cgzones@googlemail.com (mailing list archive)
State Accepted
Commit 808a43ab8821
Delegated to: Petr Lautrbach
Headers show
Series [v2,1/4] libsepol: drop message for uncommon error cases | expand

Commit Message

Christian Göttsche June 2, 2023, 1:06 p.m. UTC
Match surrounding code and the message were quite generic too.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
v2:
  added signed-off
---
 libsepol/src/kernel_to_conf.c | 2 --
 1 file changed, 2 deletions(-)

Comments

James Carter June 2, 2023, 8:24 p.m. UTC | #1
On Fri, Jun 2, 2023 at 9:07 AM Christian Göttsche
<cgzones@googlemail.com> wrote:
>
> Match surrounding code and the message were quite generic too.
>
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>

For all four patches:
Acked-by: James Carter <jwcart2@gmail.com>

> ---
> v2:
>   added signed-off
> ---
>  libsepol/src/kernel_to_conf.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/libsepol/src/kernel_to_conf.c b/libsepol/src/kernel_to_conf.c
> index c48a7114..cb7cb740 100644
> --- a/libsepol/src/kernel_to_conf.c
> +++ b/libsepol/src/kernel_to_conf.c
> @@ -2886,7 +2886,6 @@ static int write_xen_pirq_rules_to_conf(FILE *out, struct policydb *pdb)
>         for (pirq = pdb->ocontexts[1]; pirq != NULL; pirq = pirq->next) {
>                 rc = snprintf(pirq_str, 21, "%i", pirq->u.pirq);
>                 if (rc < 0 || rc >= 21) {
> -                       fprintf(stderr,"error1\n");
>                         rc = -1;
>                         goto exit;
>                 }
> @@ -2894,7 +2893,6 @@ static int write_xen_pirq_rules_to_conf(FILE *out, struct policydb *pdb)
>                 ctx = context_to_str(pdb, &pirq->context[0]);
>                 if (!ctx) {
>                         rc = -1;
> -                       fprintf(stderr,"error2\n");
>                         goto exit;
>                 }
>
> --
> 2.40.1
>
James Carter June 5, 2023, 8:11 p.m. UTC | #2
On Fri, Jun 2, 2023 at 4:24 PM James Carter <jwcart2@gmail.com> wrote:
>
> On Fri, Jun 2, 2023 at 9:07 AM Christian Göttsche
> <cgzones@googlemail.com> wrote:
> >
> > Match surrounding code and the message were quite generic too.
> >
> > Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
>
> For all four patches:
> Acked-by: James Carter <jwcart2@gmail.com>
>
These four patches have been merged.
Thanks,
Jim

> > ---
> > v2:
> >   added signed-off
> > ---
> >  libsepol/src/kernel_to_conf.c | 2 --
> >  1 file changed, 2 deletions(-)
> >
> > diff --git a/libsepol/src/kernel_to_conf.c b/libsepol/src/kernel_to_conf.c
> > index c48a7114..cb7cb740 100644
> > --- a/libsepol/src/kernel_to_conf.c
> > +++ b/libsepol/src/kernel_to_conf.c
> > @@ -2886,7 +2886,6 @@ static int write_xen_pirq_rules_to_conf(FILE *out, struct policydb *pdb)
> >         for (pirq = pdb->ocontexts[1]; pirq != NULL; pirq = pirq->next) {
> >                 rc = snprintf(pirq_str, 21, "%i", pirq->u.pirq);
> >                 if (rc < 0 || rc >= 21) {
> > -                       fprintf(stderr,"error1\n");
> >                         rc = -1;
> >                         goto exit;
> >                 }
> > @@ -2894,7 +2893,6 @@ static int write_xen_pirq_rules_to_conf(FILE *out, struct policydb *pdb)
> >                 ctx = context_to_str(pdb, &pirq->context[0]);
> >                 if (!ctx) {
> >                         rc = -1;
> > -                       fprintf(stderr,"error2\n");
> >                         goto exit;
> >                 }
> >
> > --
> > 2.40.1
> >
diff mbox series

Patch

diff --git a/libsepol/src/kernel_to_conf.c b/libsepol/src/kernel_to_conf.c
index c48a7114..cb7cb740 100644
--- a/libsepol/src/kernel_to_conf.c
+++ b/libsepol/src/kernel_to_conf.c
@@ -2886,7 +2886,6 @@  static int write_xen_pirq_rules_to_conf(FILE *out, struct policydb *pdb)
 	for (pirq = pdb->ocontexts[1]; pirq != NULL; pirq = pirq->next) {
 		rc = snprintf(pirq_str, 21, "%i", pirq->u.pirq);
 		if (rc < 0 || rc >= 21) {
-			fprintf(stderr,"error1\n");
 			rc = -1;
 			goto exit;
 		}
@@ -2894,7 +2893,6 @@  static int write_xen_pirq_rules_to_conf(FILE *out, struct policydb *pdb)
 		ctx = context_to_str(pdb, &pirq->context[0]);
 		if (!ctx) {
 			rc = -1;
-			fprintf(stderr,"error2\n");
 			goto exit;
 		}