aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchinarulezzz <alexandr.savca89@gmail.com>2018-04-22 21:13:46 +0300
committerAnders Broman <a.broman58@gmail.com>2018-05-03 04:09:42 +0000
commitec0f8e6c36f16ca0f7eeb712f823f857468ff6d9 (patch)
tree0128e3fc77ea7f97c6100bdf242f9eac98491214
parent22fc5fb86502cbd42c92948eab542e551b963fd5 (diff)
fix missing parentheses in 'if' statement
Change-Id: I47f8566c4410d6aac1111b35fff3b044c14bc70b Reviewed-on: https://code.wireshark.org/review/27079 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--epan/column-utils.c4
-rw-r--r--epan/wmem/wmem_allocator_simple.c2
-rw-r--r--epan/wmem/wmem_map.c2
-rw-r--r--frame_tvbuff.c2
-rw-r--r--wsutil/buffer.c2
5 files changed, 6 insertions, 6 deletions
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) {