From: Simon McVittie Date: Wed, 23 Jan 2019 12:05:54 +0000 (+0000) Subject: _dbus_parse_uid: Remove unused function X-Git-Tag: dbus-1.13.10~18^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd860d7525de17ecffc2c75a9e3ee617da528e34;p=thirdparty%2Fdbus.git _dbus_parse_uid: Remove unused function Signed-off-by: Simon McVittie --- diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index 245bbc4b0..1eb54bd49 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -2992,46 +2992,6 @@ _dbus_pid_for_log (void) return getpid (); } -/** - * Gets a UID from a UID string. - * - * @param uid_str the UID in string form - * @param uid UID to fill in - * @returns #TRUE if successfully filled in UID - */ -dbus_bool_t -_dbus_parse_uid (const DBusString *uid_str, - dbus_uid_t *uid) -{ - int end; - long val; - - if (_dbus_string_get_length (uid_str) == 0) - { - _dbus_verbose ("UID string was zero length\n"); - return FALSE; - } - - val = -1; - end = 0; - if (!_dbus_string_parse_int (uid_str, 0, &val, - &end)) - { - _dbus_verbose ("could not parse string as a UID\n"); - return FALSE; - } - - if (end != _dbus_string_get_length (uid_str)) - { - _dbus_verbose ("string contained trailing stuff after UID\n"); - return FALSE; - } - - *uid = val; - - return TRUE; -} - #if !DBUS_USE_SYNC /* To be thread-safe by default on platforms that don't necessarily have * atomic operations (notably Debian armel, which is armv4t), we must diff --git a/dbus/dbus-sysdeps-unix.h b/dbus/dbus-sysdeps-unix.h index 8523f8cbd..3bbf34d1a 100644 --- a/dbus/dbus-sysdeps-unix.h +++ b/dbus/dbus-sysdeps-unix.h @@ -141,9 +141,6 @@ void _dbus_group_info_free (DBusGroupInfo *info); DBUS_PRIVATE_EXPORT dbus_uid_t _dbus_geteuid (void); -dbus_bool_t _dbus_parse_uid (const DBusString *uid_str, - dbus_uid_t *uid); - DBUS_PRIVATE_EXPORT void _dbus_close_all (void); DBUS_PRIVATE_EXPORT