diff --git a/epan/column-utils.c b/epan/column-utils.c index 104739e686..ca0117f151 100644 --- a/epan/column-utils.c +++ b/epan/column-utils.c @@ -409,7 +409,7 @@ col_append_lstr(column_info *cinfo, const gint el, const gchar *str1, ...) va_start(ap, str1); str = str1; do { - if G_UNLIKELY(str == NULL) + if (G_UNLIKELY(str == NULL)) str = "(null)"; pos += g_strlcpy(&col_item->col_buf[pos], str, max_len - pos); @@ -747,7 +747,7 @@ col_add_lstr(column_info *cinfo, const gint el, const gchar *str1, ...) va_start(ap, str1); str = str1; do { - if G_UNLIKELY(str == NULL) + if (G_UNLIKELY(str == NULL)) str = "(null)"; pos += g_strlcpy(&col_item->col_buf[pos], str, max_len - pos); diff --git a/epan/wmem/wmem_allocator_simple.c b/epan/wmem/wmem_allocator_simple.c index b8d15e77d5..3c254a65ed 100644 --- a/epan/wmem/wmem_allocator_simple.c +++ b/epan/wmem/wmem_allocator_simple.c @@ -34,7 +34,7 @@ wmem_simple_alloc(void *private_data, const size_t size) allocator = (wmem_simple_allocator_t*) private_data; - if G_UNLIKELY(allocator->count == allocator->size) { + if (G_UNLIKELY(allocator->count == allocator->size)) { allocator->size *= 2; allocator->ptrs = (void**)wmem_realloc(NULL, allocator->ptrs, sizeof(void*) * allocator->size); diff --git a/epan/wmem/wmem_map.c b/epan/wmem/wmem_map.c index 8164f2b47c..b6064def15 100644 --- a/epan/wmem/wmem_map.c +++ b/epan/wmem/wmem_map.c @@ -28,7 +28,7 @@ void wmem_init_hashing(void) { x = g_random_int(); - if G_UNLIKELY(x == 0) + if (G_UNLIKELY(x == 0)) x = 1; preseed = g_random_int(); diff --git a/frame_tvbuff.c b/frame_tvbuff.c index e2aaf1826e..705cd47459 100644 --- a/frame_tvbuff.c +++ b/frame_tvbuff.c @@ -62,7 +62,7 @@ frame_cache(struct tvb_frame *frame_tvb) wtap_rec_init(&rec); if (frame_tvb->buf == NULL) { - if G_UNLIKELY(!buffer_cache) buffer_cache = g_ptr_array_sized_new(1024); + if (G_UNLIKELY(!buffer_cache)) buffer_cache = g_ptr_array_sized_new(1024); if (buffer_cache->len > 0) { frame_tvb->buf = (struct Buffer *) g_ptr_array_remove_index(buffer_cache, buffer_cache->len - 1); diff --git a/wsutil/buffer.c b/wsutil/buffer.c index 86b6ef1e78..bbe0ed11d2 100644 --- a/wsutil/buffer.c +++ b/wsutil/buffer.c @@ -21,7 +21,7 @@ void ws_buffer_init(Buffer* buffer, gsize space) { g_assert(buffer); - if G_UNLIKELY(!small_buffers) small_buffers = g_ptr_array_sized_new(1024); + if (G_UNLIKELY(!small_buffers)) small_buffers = g_ptr_array_sized_new(1024); if (space <= SMALL_BUFFER_SIZE) { if (small_buffers->len > 0) {