summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmanuele Giaquinta <exg@irssi.org>2008-04-02 11:07:03 +0000
committerexg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564>2008-04-02 11:07:03 +0000
commite8ae6d827d924b3e40891da7a56b99b85e000e18 (patch)
tree28c3427c655fa5c4893445cbfc0db2839269dd74 /src
parentd39d949b791584efa8145069dcc5c78655cd9a3b (diff)
downloadirssi-e8ae6d827d924b3e40891da7a56b99b85e000e18.zip
Always use g_realloc rather than using g_malloc when the pointer
is NULL. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4794 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/core/line-split.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/line-split.c b/src/core/line-split.c
index a93ce8e8..0ee87d23 100644
--- a/src/core/line-split.c
+++ b/src/core/line-split.c
@@ -43,8 +43,7 @@ static void linebuf_append(LINEBUF_REC *rec, const char *data, int len)
{
if (rec->len+len > rec->alloc) {
rec->alloc = nearest_power(rec->len+len);;
- rec->str = rec->str == NULL ? g_malloc(rec->alloc) :
- g_realloc(rec->str, rec->alloc);
+ rec->str = g_realloc(rec->str, rec->alloc);
}
memcpy(rec->str + rec->len, data, len);