From: John Kacur <jkacur@gmail.com>
To: rostedt@goodmis.org
Cc: Darren Hart <dvhltc@us.ibm.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] kernel-shark: fix unitialized handle compile warnings
Date: Wed, 3 Feb 2010 17:42:00 +0100 [thread overview]
Message-ID: <520f0cf11002030842m6fd73d48j547551169bbc4f6e@mail.gmail.com> (raw)
In-Reply-To: <1265213945.24386.2.camel@gandalf.stny.rr.com>
On Wed, Feb 3, 2010 at 5:19 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> On Wed, 2010-02-03 at 11:17 -0500, Steven Rostedt wrote:
>> andle)
>> > > - handle = tracecmd_open(input_file);
>> > > + handle = tracecmd_open(input_file);
>> > >
>> > > - info->handle = handle;
>> > > + if (handle)
>> > > + info->handle = handle;
>> > >
>> > > /* --- Main window --- */
>> > >
>> > > --
>> >
>> > This looks correct, but I'm wondering if it is safe to continue if the
>> > call to tracecmd_open fails?
>>
>> Actually this patch is wrong. The real code should be:
>>
>> - if (handle)
>> + if (input_file)
>
> Looking at the context, this isn't enough. We should have had:
>
> if (input_file)
> info->handle = tracecmd_open(input_file);
> else
> info->handle = NULL;
>
> -- Steve
>
Okay, are you going to push it to your repo for us? I would offer to
push it through mine if it would save you time, but it's probably
quicker if you just handle it.
next prev parent reply other threads:[~2010-02-03 16:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-01 16:50 [PATCH 0/3 V2] trace-cmd: compiler warning fixes Darren Hart
2010-02-01 16:50 ` [PATCH 1/3] trace-graph: fix printf compile warnings Darren Hart
2010-02-01 16:50 ` [PATCH 2/3] trace-cmd: " Darren Hart
2010-02-03 16:07 ` John Kacur
2010-02-03 16:31 ` Steven Rostedt
2010-02-03 16:40 ` John Kacur
2010-02-03 17:12 ` Darren Hart
2010-02-03 17:21 ` Steven Rostedt
2010-02-01 16:50 ` [PATCH 3/3] kernel-shark: fix unitialized handle " Darren Hart
2010-02-03 16:05 ` John Kacur
2010-02-03 16:17 ` Steven Rostedt
2010-02-03 16:19 ` Steven Rostedt
2010-02-03 16:42 ` John Kacur [this message]
2010-02-03 16:51 ` Steven Rostedt
2010-02-01 16:59 ` [PATCH 0/3 V2] trace-cmd: compiler warning fixes Darren Hart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=520f0cf11002030842m6fd73d48j547551169bbc4f6e@mail.gmail.com \
--to=jkacur@gmail.com \
--cc=dvhltc@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®