Re: [patch 1/2] perf jit: add missing curly braces

From: Arnaldo Carvalho de Melo
Date: Fri Jul 15 2016 - 18:27:57 EST


Em Fri, Jul 15, 2016 at 07:25:56PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Sat, Jul 16, 2016 at 12:07:12AM +0300, Dan Carpenter escreveu:
> > It doesn't change the runtime behavior, but my static checker complains
> > that curly braces were intended.
>
> Agreed, applying, thanks!

After fixing this:

[acme@jouet linux]$ am /wb/1.patch
Applying: perf jit: add missing curly braces
fatal: patch with only garbage at line 3
Patch failed at 0001 perf jit: add missing curly braces

> - Arnaldo
>
> > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> >
> > diff --git a/tools/perf/jvmti/jvmti_agent.c b/tools/perf/jvmti/jvmti_agent.c
> > index 3573f31..91bf333 100644
> > --- a/tools/perf/jvmti/jvmti_agent.c
> > +++ b/tools/perf/jvmti/jvmti_agent.c
> > @@ -491,10 +491,11 @@ jvmti_write_debug_info(void *agent, uint64_t code, const char *file,
> > if (sret != 1)
> > goto error;
> > }
> > - if (padding_count)
> > + if (padding_count) {
> > sret = fwrite_unlocked(pad_bytes, padding_count, 1, fp);
> > if (sret != 1)
> > goto error;
> > + }
> >
> > funlockfile(fp);
> > return 0;