On 01/13/2016 14:20, Stuart Haslam wrote:
On Wed, Jan 13, 2016 at 02:15:28PM +0300, Maxim Uvarov wrote:
SCN produced some buggy scanning here which leads to broken rules
set from command line and
example did not work as expected. Originally there was SCN and it
was reverted with:
That was because it was previously using SCNx32, hence expecting the
input to be in hex, SCNu32 works as expected.
Ok, thanks!
Maxim.
(api-next branch).
commit 3824a72a48da0954ec3f28d5fb6ff51cec891363
Author: Balasubramanian Manoharan <bala.manoha...@linaro.org>
Date: Thu Dec 10 19:43:20 2015 +0530
example: classifier: fix ipv4 address input format
Fixes ipv4 address input format issue.
Maxim.
On 01/13/2016 13:43, Stuart Haslam wrote:
On Tue, Jan 05, 2016 at 04:10:36PM +0100, Nicolas Morey-Chaisemartin wrote:
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu>
Reviewed-by: Stuart Haslam <stuart.has...@linaro.org>
---
example/classifier/odp_classifier.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/example/classifier/odp_classifier.c
b/example/classifier/odp_classifier.c
index fe1c3b6..6b443d7 100644
--- a/example/classifier/odp_classifier.c
+++ b/example/classifier/odp_classifier.c
@@ -167,7 +167,8 @@ int parse_ipv4_addr(const char *ipaddress, uint64_t *addr)
uint32_t b[4];
int converted;
- converted = sscanf(ipaddress, "%d.%d.%d.%d",
+ converted = sscanf(ipaddress,
+ "%" SCNu32 ".%" SCNu32 ".%" SCNu32 ".%" SCNu32 "",
&b[3], &b[2], &b[1], &b[0]);
if (4 != converted)
return -1;
--
2.6.3.373.g6d475bf.dirty
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp