summaryrefslogtreecommitdiff
path: root/dlib
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-05-22 20:42:27 +0200
committerjcid <devnull@localhost>2008-05-22 20:42:27 +0200
commitfd2515a4fa2d803750067f1b2201fabedc0340b1 (patch)
treea955cffb92c0dca61af0e1ce28968343d8789f4b /dlib
parent457fcd06bb5eb1a7546addc85f1963e8401e21af (diff)
- Some s/free/dFree/ in dlib.
Diffstat (limited to 'dlib')
-rw-r--r--dlib/dlib.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/dlib/dlib.c b/dlib/dlib.c
index f01314eb..aa96bb32 100644
--- a/dlib/dlib.c
+++ b/dlib/dlib.c
@@ -189,8 +189,7 @@ static void dStr_resize(Dstr *ds, int n_sz, int keep)
ds->str = (Dstr_char_t*) dRealloc (ds->str, n_sz*sizeof(Dstr_char_t));
ds->sz = n_sz;
} else {
- if (ds->str)
- free(ds->str);
+ dFree(ds->str);
ds->str = dNew(Dstr_char_t, n_sz);
ds->sz = n_sz;
ds->len = 0;
@@ -288,9 +287,9 @@ Dstr *dStr_new (const char *s)
void dStr_free (Dstr *ds, int all)
{
if (ds) {
- if (all && ds->str)
- free(ds->str);
- free(ds);
+ if (all)
+ dFree(ds->str);
+ dFree(ds);
}
}