From b4906f3d230c22c807cdb00b72de0d60491bba76 Mon Sep 17 00:00:00 2001 From: TingPing Date: Thu, 19 Mar 2015 16:06:49 -0400 Subject: Fix warnings --- src/common/plugin-identd.c | 4 ++-- src/common/util.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/common') diff --git a/src/common/plugin-identd.c b/src/common/plugin-identd.c index c8936d8b..ce1bd1e6 100644 --- a/src/common/plugin-identd.c +++ b/src/common/plugin-identd.c @@ -27,12 +27,12 @@ static hexchat_plugin *ph; static GSocketService *service; static GHashTable *responses; -struct ident_info +typedef struct ident_info { GSocketConnection *conn; gchar *username; gchar read_buf[16]; -} typedef ident_info; +} ident_info; static int identd_cleanup_response_cb (gpointer userdata) diff --git a/src/common/util.c b/src/common/util.c index d650c820..be3dcac2 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -246,11 +246,11 @@ expand_homedir (char *file) if (file[0] == '~') { + char *slash_pos; + if (file[1] == '\0' || file[1] == '/') return g_strconcat (g_get_home_dir (), &file[1], NULL); - char *slash_pos; - user = g_strdup(file); slash_pos = strchr(user, '/'); -- cgit 1.4.1