From: Martin Mares Date: Fri, 2 Nov 2012 21:36:42 +0000 (+0100) Subject: gary: Allow GARY_RESIZE to be used for immediate array indexing X-Git-Tag: v5.99~93 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=206656fc7fe796b9fc76c9813fdb48e5ebc42c2f;p=libucw.git gary: Allow GARY_RESIZE to be used for immediate array indexing --- diff --git a/ucw/gary.h b/ucw/gary.h index b87a6fef..6b4adfb1 100644 --- a/ucw/gary.h +++ b/ucw/gary.h @@ -22,7 +22,7 @@ struct gary_hdr { #define GARY_INIT_ZERO(ptr, n) (ptr) = gary_init(sizeof(*(ptr)), (n), 1) #define GARY_FREE(ptr) do { if (ptr) xfree(GARY_HDR(ptr)); } while (0) #define GARY_SIZE(ptr) (GARY_HDR(ptr)->num_elts) -#define GARY_RESIZE(ptr, n) (ptr) = gary_set_size((ptr), (n)) +#define GARY_RESIZE(ptr, n) ((ptr) = gary_set_size((ptr), (n))) #define GARY_INIT_OR_RESIZE(ptr, n) (ptr) = (ptr) ? gary_set_size((ptr), (n)) : gary_init(sizeof(*(ptr)), (n), 0) #define GARY_PUSH(ptr, n) ({ \