openbsd-ports/textproc/discount/patches/patch-cstring_h
jasper 20f51701c3 - update discount to 1.6.6
- mirror distfile due to stupid github
- maintainer timed-out
2010-08-30 21:40:29 +00:00

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)) \