[iproute] Fix the rtt values parser

Petr Šabata psabata at fedoraproject.org
Mon Nov 25 10:52:49 UTC 2013


commit 56aa9867027c373c27d79a9dcf6491a72081c227
Author: Petr Šabata <contyk at redhat.com>
Date:   Mon Nov 25 19:52:37 2013 +0900

    Fix the rtt values parser

 iproute2-3.11.0-rtt.patch |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)
---
diff --git a/iproute2-3.11.0-rtt.patch b/iproute2-3.11.0-rtt.patch
new file mode 100644
index 0000000..8198374
--- /dev/null
+++ b/iproute2-3.11.0-rtt.patch
@@ -0,0 +1,31 @@
+diff --git a/lib/utils.c b/lib/utils.c
+index dae1b51..8a1a65d 100644
+--- a/lib/utils.c
++++ b/lib/utils.c
+@@ -145,7 +145,7 @@ int get_time_rtt(unsigned *val, const char *arg, int *raw)
+ 			return -1;
+ 
+ 		/* extra non-digits */
+-		if (!p || p == arg || *p)
++		if (!p || p == arg)
+ 			return -1;
+ 
+ 		/* over/underflow */
+@@ -155,7 +155,7 @@ int get_time_rtt(unsigned *val, const char *arg, int *raw)
+ 		res = strtoul(arg, &p, 0);
+ 
+ 		/* empty string or trailing non-digits */
+-		if (!p || p == arg || *p)
++		if (!p || p == arg)
+ 			return -1;
+ 
+ 		/* overflow */
+@@ -165,8 +165,6 @@ int get_time_rtt(unsigned *val, const char *arg, int *raw)
+ 		t = (double)res;
+ 	}
+ 
+-	if (p == arg)
+-		return -1;
+ 	*raw = 1;
+ 
+ 	if (*p) {


More information about the scm-commits mailing list