forked from osmocom/wireshark
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>
This commit is contained in:
parent
22fc5fb865
commit
ec0f8e6c36
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue