summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/wee-string.c7
-rw-r--r--src/gui/curses/gui-curses-bar-window.c8
-rw-r--r--src/gui/gui-bar-item.c8
-rw-r--r--src/gui/gui-bar-window.c7
4 files changed, 8 insertions, 22 deletions
diff --git a/src/core/wee-string.c b/src/core/wee-string.c
index 369b232d4..66bd82153 100644
--- a/src/core/wee-string.c
+++ b/src/core/wee-string.c
@@ -1947,7 +1947,7 @@ string_translate_chars (const char *string,
{
int length, length2, translated;
const char *ptr_string, *ptr_chars1, *ptr_chars2;
- char **result, *ptr_result;
+ char **result;
if (!string)
return NULL;
@@ -1984,10 +1984,7 @@ string_translate_chars (const char *string,
ptr_string = utf8_next_char (ptr_string);
}
- ptr_result = *result;
- string_dyn_free (result, 0);
-
- return ptr_result;
+ return string_dyn_free (result, 0);
}
/*
diff --git a/src/gui/curses/gui-curses-bar-window.c b/src/gui/curses/gui-curses-bar-window.c
index 5d1ea4378..585f24eaa 100644
--- a/src/gui/curses/gui-curses-bar-window.c
+++ b/src/gui/curses/gui-curses-bar-window.c
@@ -426,7 +426,7 @@ gui_bar_window_expand_spacers (const char *string, int length_on_screen,
int bar_window_width, int num_spacers)
{
int *spacers, index_spacer, i;
- char **result, *result2, *next_char;
+ char **result, *next_char;
if (!string || !string[0])
return NULL;
@@ -517,11 +517,7 @@ gui_bar_window_expand_spacers (const char *string, int length_on_screen,
free (spacers);
- result2 = *result;
-
- string_dyn_free (result, 0);
-
- return result2;
+ return string_dyn_free (result, 0);
}
/*
diff --git a/src/gui/gui-bar-item.c b/src/gui/gui-bar-item.c
index 334b33c66..acb0e4007 100644
--- a/src/gui/gui-bar-item.c
+++ b/src/gui/gui-bar-item.c
@@ -1741,7 +1741,7 @@ gui_bar_item_buffer_nicklist_cb (const void *pointer, void *data,
struct t_gui_nick_group *ptr_group;
struct t_gui_nick *ptr_nick;
struct t_config_option *ptr_option;
- char **nicklist, *str_nicklist;
+ char **nicklist;
int i;
/* make C compiler happy */
@@ -1874,11 +1874,7 @@ gui_bar_item_buffer_nicklist_cb (const void *pointer, void *data,
gui_nicklist_get_next_item (buffer, &ptr_group, &ptr_nick);
}
- str_nicklist = *nicklist;
-
- string_dyn_free (nicklist, 0);
-
- return str_nicklist;
+ return string_dyn_free (nicklist, 0);
}
/*
diff --git a/src/gui/gui-bar-window.c b/src/gui/gui-bar-window.c
index a5a943c9d..fb54f0420 100644
--- a/src/gui/gui-bar-window.c
+++ b/src/gui/gui-bar-window.c
@@ -702,7 +702,7 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window,
{
enum t_gui_bar_filling filling;
const char *ptr_content;
- char **content, *content2, str_reinit_color[32];
+ char **content, str_reinit_color[32];
char str_reinit_color_space[32], str_reinit_color_space_start_line[32];
char str_start_item[32];
char *item_value, *item_value2, ****split_items, **linear_items;
@@ -987,10 +987,7 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window,
return NULL;
}
- content2 = *content;
- string_dyn_free (content, 0);
-
- return content2;
+ return string_dyn_free (content, 0);
}
/*