summaryrefslogtreecommitdiffstats
path: root/gatchat/gatchat.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-04-02 19:20:53 -0700
committerMarcel Holtmann <marcel@holtmann.org>2010-04-02 19:20:53 -0700
commit764501482e5e0bafb0cee7d9dd16a69bce645d9c (patch)
tree1e1d1b3de44e44329ea4baefc194e65e1dd6bb67 /gatchat/gatchat.c
parent4733ddaffaaf81cc7ccd5c099c0afd0a99512d1e (diff)
downloadofono-764501482e5e0bafb0cee7d9dd16a69bce645d9c.tar.bz2
Fix some cases where g_try_new should be used
Diffstat (limited to 'gatchat/gatchat.c')
-rw-r--r--gatchat/gatchat.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/gatchat/gatchat.c b/gatchat/gatchat.c
index ea9e06f5..ccb2a26a 100644
--- a/gatchat/gatchat.c
+++ b/gatchat/gatchat.c
@@ -171,13 +171,11 @@ static struct at_command *at_command_create(const char *cmd,
}
c = g_try_new0(struct at_command, 1);
-
if (!c)
return 0;
len = strlen(cmd);
c->cmd = g_try_new(char, len + 2);
-
if (!c->cmd) {
g_free(c);
return 0;
@@ -612,7 +610,6 @@ static char *extract_line(GAtChat *p)
}
line = g_try_new(char, line_length + 1);
-
if (!line) {
ring_buffer_drain(p->buf, p->read_so_far);
return NULL;
@@ -905,7 +902,6 @@ static GAtChat *create_chat(GIOChannel *channel, GIOFlags flags,
return NULL;
chat = g_try_new0(GAtChat, 1);
-
if (!chat)
return chat;
@@ -1200,7 +1196,6 @@ static struct at_notify *at_notify_create(GAtChat *chat, const char *prefix,
return 0;
notify = g_try_new0(struct at_notify, 1);
-
if (!notify) {
g_free(key);
return 0;
@@ -1239,7 +1234,6 @@ guint g_at_chat_register(GAtChat *chat, const char *prefix,
return 0;
node = g_try_new0(struct at_notify_node, 1);
-
if (!node)
return 0;