From: Anthony Liguori <anthony@codemonkey.ws>
To: Kevin Wolf <kwolf@suse.de>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] qemu-img: Fix type of getopt return value
Date: Thu, 15 Jan 2009 15:42:22 -0600 [thread overview]
Message-ID: <496FADBE.4080403@codemonkey.ws> (raw)
In-Reply-To: <496DA86F.40400@suse.de>
Kevin Wolf wrote:
> Anthony Liguori schrieb:
>
>> Anthony Liguori wrote:
>>
>>> +static void img_snapshot(int argc, char **argv)
>>> +{
>>> + BlockDriverState *bs;
>>> + QEMUSnapshotInfo sn;
>>> + char *filename, *snapshot_name = NULL;
>>> + char c;
>>> + int ret;
>>> + int action = 0;
>>> + qemu_timeval tv;
>>> +
>>> + /* Parse commandline parameters */
>>> + for(;;) {
>>> + c = getopt(argc, argv, "la:c:d:h");
>>> + if (c == -1)
>>> + break;
>>>
>>>
>> char's are not always signed so this code is incorrect. You should use
>> an int instead. Can you send another patch fixing this please?
>>
>
> You're right. I better should have copied not only the parsing but also
> the declarations... Patch is attached.
>
Applied. Thanks.
Regards,
Anthony Liguori
> Kevin
>
prev parent reply other threads:[~2009-01-15 21:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 17:40 [Qemu-devel] [6215] snapshot subcommand for qemu-img (Kevin Wolf) Anthony Liguori
2009-01-13 19:02 ` Anthony Liguori
2009-01-13 20:36 ` M. Warner Losh
2009-01-14 8:55 ` [Qemu-devel] [PATCH] qemu-img: Fix type of getopt return value Kevin Wolf
2009-01-15 21:42 ` Anthony Liguori [this message]
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=496FADBE.4080403@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=kwolf@suse.de \
--cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.