[SSSD] [PATCH] Remove unused code
Jakub Hrozek
jhrozek at redhat.com
Wed Sep 11 18:06:31 UTC 2013
I was wondering for a while whether to remove the code only because it's
unused when it's obviously correct. The code was added along with the
InfoPipe interface btw (2008-ish).
-------------- next part --------------
>From 6bb4e213a2eb504272f15ea74ce0bc81d8387226 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Wed, 11 Sep 2013 19:14:28 +0200
Subject: [PATCH] Remove unused code
---
src/sbus/sssd_dbus.h | 3 ---
src/sbus/sssd_dbus_common.c | 66 ---------------------------------------------
2 files changed, 69 deletions(-)
diff --git a/src/sbus/sssd_dbus.h b/src/sbus/sssd_dbus.h
index 98159a7b0a833a163a353d89aaef26a2938132dd..49b09331efcaaa0800f8d0a8942117a97fdb7efd 100644
--- a/src/sbus/sssd_dbus.h
+++ b/src/sbus/sssd_dbus.h
@@ -164,7 +164,4 @@ int sbus_conn_send(struct sbus_connection *conn,
void sbus_conn_send_reply(struct sbus_connection *conn,
DBusMessage *reply);
-int sbus_is_dbus_fixed_type(int dbus_type);
-int sbus_is_dbus_string_type(int dbus_type);
-size_t sbus_get_dbus_type_size(int dbus_type);
#endif /* _SSSD_DBUS_H_*/
diff --git a/src/sbus/sssd_dbus_common.c b/src/sbus/sssd_dbus_common.c
index d762005ea10bc192010ecb4c9366706cb618e46f..d16a763aea919b92bbdd8a65a20972878735f33d 100644
--- a/src/sbus/sssd_dbus_common.c
+++ b/src/sbus/sssd_dbus_common.c
@@ -377,69 +377,3 @@ void sbus_remove_timeout(DBusTimeout *dbus_timeout, void *data)
talloc_free(timeout);
}
-
-/* =Helpers=============================================================== */
-
-int sbus_is_dbus_fixed_type(int dbus_type)
-{
- switch (dbus_type) {
- case DBUS_TYPE_BYTE:
- case DBUS_TYPE_BOOLEAN:
- case DBUS_TYPE_INT16:
- case DBUS_TYPE_UINT16:
- case DBUS_TYPE_INT32:
- case DBUS_TYPE_UINT32:
- case DBUS_TYPE_INT64:
- case DBUS_TYPE_UINT64:
- case DBUS_TYPE_DOUBLE:
- return true;
- }
- return false;
-}
-
-int sbus_is_dbus_string_type(int dbus_type)
-{
- switch(dbus_type) {
- case DBUS_TYPE_STRING:
- case DBUS_TYPE_OBJECT_PATH:
- case DBUS_TYPE_SIGNATURE:
- return true;
- }
- return false;
-}
-
-size_t sbus_get_dbus_type_size(int dbus_type)
-{
- size_t ret;
-
- switch(dbus_type) {
- /* 1-byte types */
- case DBUS_TYPE_BYTE:
- ret = 1;
- break;
-
- /* 2-byte types */
- case DBUS_TYPE_INT16:
- case DBUS_TYPE_UINT16:
- ret = 2;
- break;
-
- /* 4-byte types */
- case DBUS_TYPE_BOOLEAN:
- case DBUS_TYPE_INT32:
- case DBUS_TYPE_UINT32:
- ret = 4;
- break;
-
- /* 8-byte types */
- case DBUS_TYPE_INT64:
- case DBUS_TYPE_UINT64:
- case DBUS_TYPE_DOUBLE:
- ret = 8;
- break;
-
- default:
- ret = 0;
- }
- return ret;
-}
--
1.8.3.1
More information about the sssd-devel
mailing list