Commit 84bd35e4 authored by Thomas Haller's avatar Thomas Haller Committed by Lubomir Rintel

shared: use nm_str_skip_leading_spaces() in _nm_utils_ascii_str_to_int64()

(cherry picked from commit 9d2623cc)
parent 4be7cf71
......@@ -734,10 +734,7 @@ _nm_utils_ascii_str_to_int64 (const char *str, guint base, gint64 min, gint64 ma
gint64 v;
const char *s = NULL;
if (str) {
while (g_ascii_isspace (str[0]))
str++;
}
str = nm_str_skip_leading_spaces (str);
if (!str || !str[0]) {
errno = EINVAL;
return fallback;
......@@ -748,9 +745,9 @@ _nm_utils_ascii_str_to_int64 (const char *str, guint base, gint64 min, gint64 ma
if (errno != 0)
return fallback;
if (s[0] != '\0') {
while (g_ascii_isspace (s[0]))
s++;
s = nm_str_skip_leading_spaces (s);
if (s[0] != '\0') {
errno = EINVAL;
return fallback;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment