20f51701c3
- mirror distfile due to stupid github - maintainer timed-out
13 lines
492 B
Plaintext
13 lines
492 B
Plaintext
$OpenBSD: patch-cstring_h,v 1.2 2010/08/30 21:40:29 jasper Exp $
|
|
--- cstring.h.orig Thu Jun 17 03:14:33 2010
|
|
+++ cstring.h Mon Aug 30 15:01:46 2010
|
|
@@ -18,7 +18,7 @@
|
|
*/
|
|
#define STRING(type) struct { type *text; int size, alloc; }
|
|
|
|
-#define CREATE(x) T(x) = (void*)(S(x) = (x).alloc = 0)
|
|
+#define CREATE(x) T(x) = NULL; (S(x) = (x).alloc = 0)
|
|
#define EXPAND(x) (S(x)++)[(S(x) < (x).alloc) \
|
|
? (T(x)) \
|
|
: (T(x) = T(x) ? realloc(T(x), sizeof T(x)[0] * ((x).alloc += 100)) \
|