X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=liblttng-ht%2Flttng-ht.c;fp=liblttng-ht%2Flttng-ht.c;h=74e5ed4feb169cf803d90e7debea78b6c507722f;hp=d55c95373f6dcb2f1e25d4608f133455279b93f9;hb=dc78d159de0471583f04ba6dae2b0808b540844f;hpb=2c1dd183d5e75a133090c65ecb4ff326981b3ad9 diff --git a/liblttng-ht/lttng-ht.c b/liblttng-ht/lttng-ht.c index d55c95373..74e5ed4fe 100644 --- a/liblttng-ht/lttng-ht.c +++ b/liblttng-ht/lttng-ht.c @@ -62,7 +62,8 @@ struct lttng_ht *lttng_ht_new(unsigned long size, int type) struct lttng_ht *ht; /* Test size */ - size != 0 ? : (size = DEFAULT_HT_SIZE); + if (!size) + size = DEFAULT_HT_SIZE; ht = zmalloc(sizeof(*ht)); if (ht == NULL) {