* [PATCH] Fix getopt on arm platforms
@ 2012-11-30 10:08 Lluís Batlle i Rossell
0 siblings, 0 replies; only message in thread
From: Lluís Batlle i Rossell @ 2012-11-30 10:08 UTC (permalink / raw)
To: Btrfs mailing list
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-11-30 10:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-30 10:08 [PATCH] Fix getopt on arm platforms Lluís Batlle i Rossell
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).