]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
_dbus_parse_uid: Remove unused function
authorSimon McVittie <smcv@collabora.com>
Wed, 23 Jan 2019 12:05:54 +0000 (12:05 +0000)
committerSimon McVittie <smcv@collabora.com>
Wed, 23 Jan 2019 12:05:54 +0000 (12:05 +0000)
Signed-off-by: Simon McVittie <smcv@collabora.com>
dbus/dbus-sysdeps-unix.c
dbus/dbus-sysdeps-unix.h

index 245bbc4b0b870671dab469b8a726b56a04e009a8..1eb54bd4930516bac6dac012b212604b9fdcdfbe 100644 (file)
@@ -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
index 8523f8cbd57a095e19f9d15a86b9bfaada114b5a..3bbf34d1a525bdb7071a0fba973b06f143782c79 100644 (file)
@@ -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