From c59ae99e670d42b13f2a81fb2a9cfcb98d20769a Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 4 Jan 2013 12:27:55 -0800 Subject: [PATCH] obexd: Remove the total silly usage of gchar and replace it with char --- obexd/client/ftp.c | 12 ++++++------ obexd/client/manager.c | 2 +- obexd/client/map.c | 20 ++++++++++---------- obexd/client/pbap.c | 24 ++++++++++++------------ obexd/client/session.c | 4 ++-- obexd/client/transfer.c | 4 ++-- obexd/plugins/ftp.c | 2 +- obexd/plugins/mas.c | 2 +- obexd/plugins/pcsuite.c | 2 +- obexd/plugins/phonebook-ebook.c | 2 +- 10 files changed, 37 insertions(+), 37 deletions(-) diff --git a/obexd/client/ftp.c b/obexd/client/ftp.c index 08a50d4fd..a4cf3fcf1 100644 --- a/obexd/client/ftp.c +++ b/obexd/client/ftp.c @@ -98,14 +98,14 @@ static DBusMessage *change_folder(DBusConnection *connection, } static void xml_element(GMarkupParseContext *ctxt, - const gchar *element, - const gchar **names, - const gchar **values, + const char *element, + const char **names, + const char **values, gpointer user_data, GError **gerr) { DBusMessageIter dict, *iter = user_data; - gchar *key; + char *key; gint i; if (strcasecmp("folder", element) != 0 && strcasecmp("file", element) != 0) @@ -121,7 +121,7 @@ static void xml_element(GMarkupParseContext *ctxt, /* FIXME: User, Group, Other permission must be reviewed */ i = 0; - for (key = (gchar *) names[i]; key; key = (gchar *) names[++i]) { + for (key = (char *) names[i]; key; key = (char *) names[++i]) { key[0] = g_ascii_toupper(key[0]); if (g_str_equal("Size", key) == TRUE) { guint64 size; @@ -271,7 +271,7 @@ static DBusMessage *put_file(DBusConnection *connection, struct ftp_data *ftp = user_data; struct obc_session *session = ftp->session; struct obc_transfer *transfer; - gchar *sourcefile, *targetfile; + char *sourcefile, *targetfile; GError *err = NULL; DBusMessage *reply; diff --git a/obexd/client/manager.c b/obexd/client/manager.c index 03e60a4da..8efe1f259 100644 --- a/obexd/client/manager.c +++ b/obexd/client/manager.c @@ -218,7 +218,7 @@ static DBusMessage *remove_session(DBusConnection *connection, DBusMessage *message, void *user_data) { struct obc_session *session; - const gchar *sender, *path; + const char *sender, *path; if (dbus_message_get_args(message, NULL, DBUS_TYPE_OBJECT_PATH, &path, diff --git a/obexd/client/map.c b/obexd/client/map.c index df2b0bf6b..08914a654 100644 --- a/obexd/client/map.c +++ b/obexd/client/map.c @@ -163,12 +163,12 @@ static DBusMessage *map_setpath(DBusConnection *connection, return NULL; } -static void folder_element(GMarkupParseContext *ctxt, const gchar *element, - const gchar **names, const gchar **values, +static void folder_element(GMarkupParseContext *ctxt, const char *element, + const char **names, const char **values, gpointer user_data, GError **gerr) { DBusMessageIter dict, *iter = user_data; - const gchar *key; + const char *key; gint i; if (strcasecmp("folder", element) != 0) @@ -831,15 +831,15 @@ static struct map_msg_parser { { } }; -static void msg_element(GMarkupParseContext *ctxt, const gchar *element, - const gchar **names, const gchar **values, +static void msg_element(GMarkupParseContext *ctxt, const char *element, + const char **names, const char **values, gpointer user_data, GError **gerr) { struct map_parser *parser = user_data; struct map_data *data = parser->data; DBusMessageIter entry, dict, *iter = parser->iter; struct map_msg *msg; - const gchar *key; + const char *key; gint i; if (strcasecmp("msg", element) != 0) @@ -1249,12 +1249,12 @@ static DBusMessage *map_list_messages(DBusConnection *connection, return get_message_listing(map, message, folder, apparam); } -static gchar **get_filter_strs(uint64_t filter, gint *size) +static char **get_filter_strs(uint64_t filter, gint *size) { - gchar **list, **item; + char **list, **item; gint i; - list = g_malloc0(sizeof(gchar **) * (FILTER_BIT_MAX + 2)); + list = g_malloc0(sizeof(char **) * (FILTER_BIT_MAX + 2)); item = list; @@ -1270,7 +1270,7 @@ static gchar **get_filter_strs(uint64_t filter, gint *size) static DBusMessage *map_list_filter_fields(DBusConnection *connection, DBusMessage *message, void *user_data) { - gchar **filters = NULL; + char **filters = NULL; gint size; DBusMessage *reply; diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c index 326db4beb..25cc17c4b 100644 --- a/obexd/client/pbap.c +++ b/obexd/client/pbap.c @@ -144,20 +144,20 @@ static void pending_request_free(struct pending_request *p) } static void listing_element(GMarkupParseContext *ctxt, - const gchar *element, - const gchar **names, - const gchar **values, + const char *element, + const char **names, + const char **values, gpointer user_data, GError **gerr) { DBusMessageIter *item = user_data, entry; - gchar **key; - const gchar *handle = NULL, *vcardname = NULL; + char **key; + const char *handle = NULL, *vcardname = NULL; if (g_str_equal(element, "card") != TRUE) return; - for (key = (gchar **) names; *key; key++, values++) { + for (key = (char **) names; *key; key++, values++) { if (g_str_equal(*key, "handle") == TRUE) handle = *values; else if (g_str_equal(*key, "name") == TRUE) @@ -180,9 +180,9 @@ static const GMarkupParser listing_parser = { NULL, NULL }; -static gchar *build_phonebook_path(const char *location, const char *item) +static char *build_phonebook_path(const char *location, const char *item) { - gchar *path = NULL, *tmp, *tmp1; + char *path = NULL, *tmp, *tmp1; if (!g_ascii_strcasecmp(location, "int") || !g_ascii_strcasecmp(location, "internal")) @@ -876,12 +876,12 @@ static DBusMessage *pbap_get_size(DBusConnection *connection, return pull_phonebook(pbap, message, GETPHONEBOOKSIZE, NULL, apparam); } -static gchar **get_filter_strs(uint64_t filter, gint *size) +static char **get_filter_strs(uint64_t filter, gint *size) { - gchar **list, **item; + char **list, **item; gint i; - list = g_malloc0(sizeof(gchar **) * (FILTER_BIT_MAX + 2)); + list = g_malloc0(sizeof(char **) * (FILTER_BIT_MAX + 2)); item = list; @@ -901,7 +901,7 @@ static gchar **get_filter_strs(uint64_t filter, gint *size) static DBusMessage *pbap_list_filter_fields(DBusConnection *connection, DBusMessage *message, void *user_data) { - gchar **filters = NULL; + char **filters = NULL; gint size; DBusMessage *reply; diff --git a/obexd/client/session.c b/obexd/client/session.c index cc10f8857..9cc824ec4 100644 --- a/obexd/client/session.c +++ b/obexd/client/session.c @@ -89,11 +89,11 @@ struct obc_session { uint8_t channel; struct obc_transport *transport; struct obc_driver *driver; - gchar *path; /* Session path */ + char *path; /* Session path */ DBusConnection *conn; GObex *obex; struct pending_request *p; - gchar *owner; /* Session owner */ + char *owner; /* Session owner */ guint watch; GQueue *queue; guint queue_complete_id; diff --git a/obexd/client/transfer.c b/obexd/client/transfer.c index 3b4a0037c..541f4052b 100644 --- a/obexd/client/transfer.c +++ b/obexd/client/transfer.c @@ -75,7 +75,7 @@ struct obc_transfer { char *session; /* Session path */ char *owner; /* Transfer initiator */ char *path; /* Transfer path */ - gchar *filename; /* Transfer file location */ + char *filename; /* Transfer file location */ char *name; /* Transfer object name */ char *type; /* Transfer object type */ int fd; @@ -144,7 +144,7 @@ static DBusMessage *obc_transfer_cancel(DBusConnection *connection, DBusMessage *message, void *user_data) { struct obc_transfer *transfer = user_data; - const gchar *sender; + const char *sender; sender = dbus_message_get_sender(message); if (g_strcmp0(transfer->owner, sender) != 0) diff --git a/obexd/plugins/ftp.c b/obexd/plugins/ftp.c index d53774dfb..773861ddf 100644 --- a/obexd/plugins/ftp.c +++ b/obexd/plugins/ftp.c @@ -316,7 +316,7 @@ done: static gboolean is_valid_path(const char *path) { - gchar **elements, **cur; + char **elements, **cur; int depth = 0; elements = g_strsplit(path, "/", 0); diff --git a/obexd/plugins/mas.c b/obexd/plugins/mas.c index 3270edd7d..5729c22e0 100644 --- a/obexd/plugins/mas.c +++ b/obexd/plugins/mas.c @@ -216,7 +216,7 @@ failed: /* FIXME: Preserve whitespaces */ static void g_string_append_escaped_printf(GString *string, - const gchar *format, ...) + const char *format, ...) { va_list ap; char *escaped; diff --git a/obexd/plugins/pcsuite.c b/obexd/plugins/pcsuite.c index 6ad8f4958..4ce2fe421 100644 --- a/obexd/plugins/pcsuite.c +++ b/obexd/plugins/pcsuite.c @@ -261,7 +261,7 @@ static struct obex_service_driver pcsuite = { }; struct backup_object { - gchar *cmd; + char *cmd; int fd; int oflag; int error_code; diff --git a/obexd/plugins/phonebook-ebook.c b/obexd/plugins/phonebook-ebook.c index 59a4eac84..2e4957671 100644 --- a/obexd/plugins/phonebook-ebook.c +++ b/obexd/plugins/phonebook-ebook.c @@ -420,7 +420,7 @@ static GSList *open_ebooks(void) GError *gerr = NULL; ESourceList *src_list; GSList *list; - gchar *default_src = NULL; + char *default_src = NULL; GSList *ebooks = NULL; if (e_book_get_addressbooks(&src_list, &gerr) == FALSE) { -- 2.47.3