summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceUtil/InputUtil.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/cpp/src/IceUtil/InputUtil.cpp b/cpp/src/IceUtil/InputUtil.cpp
index 39de0ac168e..00dbc5e61fa 100644
--- a/cpp/src/IceUtil/InputUtil.cpp
+++ b/cpp/src/IceUtil/InputUtil.cpp
@@ -82,18 +82,15 @@ strToInt64Impl(const char* s, char** endptr, int base)
base = 8;
++s;
- if(*s == '\0')
+ //
+ // We have at least this zero
+ //
+ if(endptr)
{
- //
- // Just '0'
- //
- if(endptr)
- {
- *endptr = const_cast<char *>(s);
- }
- return 0;
+ *endptr = const_cast<char *>(s);
}
- else if(*s == 'x' || *s == 'X')
+
+ if(*s == 'x' || *s == 'X')
{
base = 16;
++s;
@@ -116,7 +113,7 @@ strToInt64Impl(const char* s, char** endptr, int base)
if(*s == '\0')
{
//
- // We did not read any digit so we don't update endptr
+ // We did not read any new digit so we don't update endptr
//
return 0;
}