diff options
author | jcid <devnull@localhost> | 2008-10-22 19:44:40 +0200 |
---|---|---|
committer | jcid <devnull@localhost> | 2008-10-22 19:44:40 +0200 |
commit | f144706fd7987fa9fa8555e5ff25ec326e4a07f5 (patch) | |
tree | 917722b688bfcf7b06234491409a2b8786f313e5 /dlib/dlib.c | |
parent | b24af37659134db2198199e3b534bc767a582e58 (diff) |
- Allowed compilation with older machines by removing a few C99isms.
- Added use of inttypes.h when stdint.h isn't found.
Diffstat (limited to 'dlib/dlib.c')
-rw-r--r-- | dlib/dlib.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dlib/dlib.c b/dlib/dlib.c index f92f64e7..76797af5 100644 --- a/dlib/dlib.c +++ b/dlib/dlib.c @@ -204,10 +204,11 @@ static void dStr_resize(Dstr *ds, int n_sz, int keep) */ Dstr *dStr_sized_new (int sz) { + Dstr *ds; if (sz < 2) sz = 2; - Dstr *ds = dNew(Dstr, 1); + ds = dNew(Dstr, 1); ds->str = NULL; dStr_resize(ds, sz + 1, 0); /* (sz + 1) for the extra '\0' */ return ds; @@ -476,10 +477,11 @@ const char *dStr_printable(Dstr *in, int maxlen) */ Dlist *dList_new(int size) { + Dlist *l; if (size <= 0) return NULL; - Dlist *l = dNew(Dlist, 1); + l = dNew(Dlist, 1); l->len = 0; l->sz = size; l->list = dNew(void*, l->sz); |