-/* $OpenBSD: mem.h,v 1.9 2016/05/07 14:03:01 martijn Exp $ */
+/* $OpenBSD: mem.h,v 1.10 2017/06/24 16:30:47 martijn Exp $ */
/*-
* Copyright (c) 1993, 1994
*/
#define ADD_SPACE_GOTO(sp, bp, blen, nlen) { \
GS *L__gp = (sp) == NULL ? NULL : (sp)->gp; \
- if (L__gp == NULL || (bp) == L__gp->tmp_bp) { \
+ if (L__gp != NULL && (bp) == L__gp->tmp_bp) { \
F_CLR(L__gp, G_TMP_INUSE); \
BINC_GOTO((sp), L__gp->tmp_bp, L__gp->tmp_blen, (nlen));\
(bp) = L__gp->tmp_bp; \
}
#define ADD_SPACE_RET(sp, bp, blen, nlen) { \
GS *L__gp = (sp) == NULL ? NULL : (sp)->gp; \
- if (L__gp == NULL || (bp) == L__gp->tmp_bp) { \
+ if (L__gp != NULL && (bp) == L__gp->tmp_bp) { \
F_CLR(L__gp, G_TMP_INUSE); \
BINC_RET((sp), L__gp->tmp_bp, L__gp->tmp_blen, (nlen)); \
(bp) = L__gp->tmp_bp; \