|
From: | Anthony Liguori |
Subject: | [Qemu-devel] Re: [PATCH] qemu-img: Fix type of getopt return value |
Date: | Thu, 15 Jan 2009 15:42:22 -0600 |
User-agent: | Thunderbird 2.0.0.19 (X11/20090105) |
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 in Thread] | Current Thread | [Next in Thread] |