btrfs-progs: Fix getopt on arm platforms

There, 'char' is unsigned, so once assigned '-1' from getopt, it gets
the value 255. Then, it compared to '-1' gives false.

Signed-off-by: Lluis Batlle i Rossell <viric@viric.name>
master
Lluis Batlle i Rossell 2012-11-30 11:08:39 +01:00 committed by David Sterba
parent 8c5b2ae588
commit bb0eabc383
2 changed files with 2 additions and 2 deletions

View File

@ -1606,7 +1606,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;

View File

@ -416,7 +416,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;