gudev: Use g_ascii_strtoull() instead of strtoul()
This ensures that we get the same behavior on both 32- and 64-bit. Pointed out on the mailing list: http://permalink.gmane.org/gmane.linux.hotplug.devel/17145 Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
parent
39649a8b3a
commit
45197c02a5
|
@ -538,7 +538,7 @@ out:
|
||||||
* @key: Name of property.
|
* @key: Name of property.
|
||||||
*
|
*
|
||||||
* Look up the value for @key on @device and convert it to an unsigned
|
* Look up the value for @key on @device and convert it to an unsigned
|
||||||
* 64-bit integer using strtoul().
|
* 64-bit integer using g_ascii_strtoull().
|
||||||
*
|
*
|
||||||
* Returns: The value for @key or 0 if @key doesn't exist or isn't a
|
* Returns: The value for @key or 0 if @key doesn't exist or isn't a
|
||||||
* #guint64.
|
* #guint64.
|
||||||
|
@ -558,7 +558,7 @@ g_udev_device_get_property_as_uint64 (GUdevDevice *device,
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
result = strtoul (s, NULL, 0);
|
result = g_ascii_strtoull (s, NULL, 0);
|
||||||
out:
|
out:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -756,7 +756,7 @@ out:
|
||||||
* @name: Name of the sysfs attribute.
|
* @name: Name of the sysfs attribute.
|
||||||
*
|
*
|
||||||
* Look up the sysfs attribute with @name on @device and convert it to an unsigned
|
* Look up the sysfs attribute with @name on @device and convert it to an unsigned
|
||||||
* 64-bit integer using strtoul().
|
* 64-bit integer using g_ascii_strtoull().
|
||||||
*
|
*
|
||||||
* Returns: The value of the sysfs attribute or 0 if there is no such
|
* Returns: The value of the sysfs attribute or 0 if there is no such
|
||||||
* attribute.
|
* attribute.
|
||||||
|
@ -776,7 +776,7 @@ g_udev_device_get_sysfs_attr_as_uint64 (GUdevDevice *device,
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
result = strtoul (s, NULL, 0);
|
result = g_ascii_strtoull (s, NULL, 0);
|
||||||
out:
|
out:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue