use g_strndup instead of strndup
authorHelmut Grohne <helmut@subdivi.de>
Wed, 29 Jul 2009 10:28:59 +0000 (12:28 +0200)
committerHelmut Grohne <helmut@subdivi.de>
Wed, 29 Jul 2009 10:28:59 +0000 (12:28 +0200)
uzbl.c

diff --git a/uzbl.c b/uzbl.c
index 665fe76..0835f51 100644 (file)
--- a/uzbl.c
+++ b/uzbl.c
@@ -289,9 +289,7 @@ expand(const char *s, guint recurse) {
                 }
                 assert(vend);
 
                 }
                 assert(vend);
 
-                ret = strndup(s, vend-s);
-                if(!ret)
-                        abort();
+                ret = g_strndup(s, vend-s);
 
                 if(etype == EXP_SIMPLE_VAR ||
                    etype == EXP_BRACED_VAR) {
 
                 if(etype == EXP_SIMPLE_VAR ||
                    etype == EXP_BRACED_VAR) {