From 09fc12a929c6a372578a518fd20aee2472ca6b14 Mon Sep 17 00:00:00 2001 From: Zdenek Styblik Date: Thu, 26 Jan 2012 14:30:53 +0000 Subject: [PATCH] Fixes silly mistake I made in comparison in functions str2long() and str2ulong() in 'lib/helper.c'. Fixes: end_ptr -> *end_ptr --- ipmitool/lib/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipmitool/lib/helper.c b/ipmitool/lib/helper.c index 1fcd2e0..fb10770 100644 --- a/ipmitool/lib/helper.c +++ b/ipmitool/lib/helper.c @@ -163,7 +163,7 @@ int str2long(const char * str, int64_t * lng_ptr) errno = 0; *lng_ptr = strtol(str, &end_ptr, 0); - if (end_ptr != '\0') + if (*end_ptr != '\0') return (-2); if (errno != 0) @@ -190,7 +190,7 @@ int str2ulong(const char * str, uint64_t * ulng_ptr) errno = 0; *ulng_ptr = strtoul(str, &end_ptr, 0); - if (end_ptr != '\0') + if (*end_ptr != '\0') return (-2); if (errno != 0)