@@ -219,13 +219,13 @@ typedef struct tfwstr_t {
219
219
#define TFW_STR_STRING (val ) ((TfwStr){.data = (val), NULL, \
220
220
sizeof(val) - 1, 0, 0, 0})
221
221
#define DEFINE_TFW_STR (name , val ) TfwStr name = TFW_STR_STRING(val)
222
- #define TFW_STR_FROM_CSTR (s ) ((TfwStr){.data = (char*)s , \
222
+ #define TFW_STR_FROM_CSTR (s ) ((TfwStr){.data = (char*)(s) , \
223
223
NULL, strlen(s), 0, 0, 0})
224
224
225
225
/* Use this with "%.*s" in printing calls. */
226
226
#define PR_TFW_STR (s ) (int)min(20UL, (s)->len), (s)->data
227
227
228
- #define TFW_STR_INIT (s ) memset(s , 0, sizeof(TfwStr))
228
+ #define TFW_STR_INIT (s ) memset((s) , 0, sizeof(TfwStr))
229
229
230
230
#define TFW_STR_EMPTY (s ) (!((s)->nchunks | (s)->len))
231
231
#define TFW_STR_PLAIN (s ) (!((s)->nchunks))
@@ -236,7 +236,7 @@ typedef struct tfwstr_t {
236
236
#define TFW_STR_CHUNK (s , c ) (!TFW_STR_PLAIN(s) \
237
237
? ((c) >= (s)->nchunks \
238
238
? NULL \
239
- : __TFW_STR_CH(s , (c))) \
239
+ : __TFW_STR_CH((s) , (c))) \
240
240
: (!(c) ? s : NULL))
241
241
/*
242
242
* Get last/current chunk of @s.
@@ -266,7 +266,7 @@ typedef struct tfwstr_t {
266
266
}
267
267
268
268
#define TFW_STR_FOR_EACH_CHUNK (c , s , end ) \
269
- TFW_STR_FOR_EACH_CHUNK_INIT(c, s , end); \
269
+ TFW_STR_FOR_EACH_CHUNK_INIT(c, (s) , end); \
270
270
for ( ; (c) < end; ++(c))
271
271
272
272
/* The same as above, but for duplicate strings. */
0 commit comments