diff mbox

nfsdcltrack: getopt_long() fails on a non x86_64 archs

Message ID 20180624183619.59562-1-steved@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Steve Dickson June 24, 2018, 6:36 p.m. UTC
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.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1551903

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 utils/nfsdcltrack/nfsdcltrack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Steve Dickson June 25, 2018, 3:36 p.m. UTC | #1
On 06/24/2018 02:36 PM, Steve Dickson wrote:
> 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.
> 
> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1551903
> 
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed... 

steved.
> ---
>  utils/nfsdcltrack/nfsdcltrack.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/utils/nfsdcltrack/nfsdcltrack.c b/utils/nfsdcltrack/nfsdcltrack.c
> index 76b06d2..b45a904 100644
> --- a/utils/nfsdcltrack/nfsdcltrack.c
> +++ b/utils/nfsdcltrack/nfsdcltrack.c
> @@ -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;
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/utils/nfsdcltrack/nfsdcltrack.c b/utils/nfsdcltrack/nfsdcltrack.c
index 76b06d2..b45a904 100644
--- a/utils/nfsdcltrack/nfsdcltrack.c
+++ b/utils/nfsdcltrack/nfsdcltrack.c
@@ -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;