projects
/
nbd.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7943cbb
)
Fix getopt usage
author
Wouter Verhelst <w@uter.be>
Sun, 13 Feb 2011 10:17:47 +0000
(11:17 +0100)
committer
Wouter Verhelst <w@uter.be>
Sun, 13 Feb 2011 10:17:47 +0000
(11:17 +0100)
getopt returns an int, not a char. Since char is unsigned by default on
some architectures, this caused an infinite loop in option parsing
there.
nbd-tester-client.c
patch
|
blob
|
history
diff --git
a/nbd-tester-client.c
b/nbd-tester-client.c
index
37981c4
..
d52b687
100644
(file)
--- a/
nbd-tester-client.c
+++ b/
nbd-tester-client.c
@@
-396,7
+396,7
@@
int main(int argc, char**argv) {
long int p = 0;
char* name = NULL;
int sock=0;
- char c;
+ int c;
bool want_port = TRUE;
int nonopt=0;
testfunc test = throughput_test;