From: "Lluís Batlle i Rossell" <viric@viric.name>
To: Btrfs mailing list <linux-btrfs@vger.kernel.org>
Subject: [PATCH] Fix getopt on arm platforms
Date: Fri, 30 Nov 2012 11:08:39 +0100 [thread overview]
Message-ID: <20121130100839.GA25766@vicerveza.homeunix.net> (raw)
There, 'char' is unsigned, so once assigned '-1' from getopt, it gets
the value 255. Then, it compared to '-1' gives false.
---
cmds-scrub.c | 2 +-
cmds-send.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmds-scrub.c b/cmds-scrub.c
index 24be20f..c972e3b 100644
--- a/cmds-scrub.c
+++ b/cmds-scrub.c
@@ -1604,7 +1604,7 @@ static int cmd_scrub_status(int argc, char **argv)
int i;
int print_raw = 0;
int do_stats_per_dev = 0;
- char c;
+ int c;
char fsid[37];
int fdres = -1;
int err = 0;
diff --git a/cmds-send.c b/cmds-send.c
index 9b47e70..2e44114 100644
--- a/cmds-send.c
+++ b/cmds-send.c
@@ -414,7 +414,7 @@ out:
int cmd_send_start(int argc, char **argv)
{
char *subvol = NULL;
- char c;
+ int c;
int ret;
char *outname = NULL;
struct btrfs_send send;
--
1.8.0
reply other threads:[~2012-11-30 10:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20121130100839.GA25766@vicerveza.homeunix.net \
--to=viric@viric.name \
--cc=linux-btrfs@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).