Blame SOURCES/0001-Use-integer-as-getopt_long-returns-integer.patch
|
|
23f80e |
From a846db7bde6f756e320035da7cfe4d78e62e2a87 Mon Sep 17 00:00:00 2001
|
|
|
23f80e |
From: Honggang Li <honli@redhat.com>
|
|
|
23f80e |
Date: Tue, 25 Apr 2017 13:28:41 +0800
|
|
|
23f80e |
Subject: [PATCH] Use integer as getopt_long returns integer
|
|
|
23f80e |
|
|
|
23f80e |
ARM chars are unsigned by default. getopt_long return 255 instead -1.
|
|
|
23f80e |
That will cause an endless loop for aarch64 platform.
|
|
|
23f80e |
|
|
|
23f80e |
Signed-off-by: Honggang Li <honli@redhat.com>
|
|
|
23f80e |
---
|
|
|
23f80e |
rdma-ndd/rdma-ndd.c | 2 +-
|
|
|
23f80e |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
23f80e |
|
|
|
23f80e |
diff --git a/rdma-ndd/rdma-ndd.c b/rdma-ndd/rdma-ndd.c
|
|
|
23f80e |
index 1579a02..e7be22b 100644
|
|
|
23f80e |
--- a/rdma-ndd/rdma-ndd.c
|
|
|
23f80e |
+++ b/rdma-ndd/rdma-ndd.c
|
|
|
23f80e |
@@ -297,7 +297,7 @@ int main(int argc, char *argv[])
|
|
|
23f80e |
{ }
|
|
|
23f80e |
};
|
|
|
23f80e |
|
|
|
23f80e |
- char c = getopt_long(argc, argv, "fh", long_opts, &opt_idx);
|
|
|
23f80e |
+ int c = getopt_long(argc, argv, "fh", long_opts, &opt_idx);
|
|
|
23f80e |
if (c == -1)
|
|
|
23f80e |
break;
|
|
|
23f80e |
|
|
|
23f80e |
--
|
|
|
23f80e |
1.8.3.1
|
|
|
23f80e |
|