Skip to contentSkip to conversation

nfsdcltrack: getopt_long() fails on a non x86_64 archs

PATCH In review Steve Dickson 1 participant 2 messages Jun 24, 2018 – Jun 25, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfsdcltrack: getopt_long() fails on a non x86_64 archs

getopt_long() returns an int, not char, which
matters on non-x86_64 archs since a char is
signed on x86_64 arch but unsigned on other
archs.

---
 utils/nfsdcltrack/nfsdcltrack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
utils/nfsdcltrack/nfsdcltrack.c +1 -1
index 76b06d2..b45a904 100644
@@ -553,7 +553,7 @@ find_cmd(char *cmdname)
 int
 main(int argc, char **argv)
 {
-	char arg;
+	int arg;
 	char *val;
 	int rc = 0;
 	char *progname, *cmdarg = NULL;
Signature · 1 line
2.17.1
#1 lore raw
Quoted 8 lines · Steve Dickson

getopt_long() returns an int, not char, which
matters on non-x86_64 archs since a char is
signed on x86_64 arch but unsigned on other
archs.

Committed...

steved.

Quoted 18 lines
---
 utils/nfsdcltrack/nfsdcltrack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
utils/nfsdcltrack/nfsdcltrack.c +1 -1
index 76b06d2..b45a904 100644
@@ -553,7 +553,7 @@ find_cmd(char *cmdname)
 int
 main(int argc, char **argv)
 {
-	char arg;
+	int arg;
 	char *val;
 	int rc = 0;
 	char *progname, *cmdarg = NULL;