mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 04:22:34 +03:00
Remove redundant checks for g_strdup().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
20ab79ba00
commit
e78b1fdf66
@ -236,9 +236,9 @@ tty_color_set_defaults (const char *fgcolor, const char *bgcolor, const char *at
|
||||
g_free (tty_color_defaults__bg);
|
||||
g_free (tty_color_defaults__attrs);
|
||||
|
||||
tty_color_defaults__fg = (fgcolor != NULL) ? g_strdup (fgcolor) : NULL;
|
||||
tty_color_defaults__bg = (bgcolor != NULL) ? g_strdup (bgcolor) : NULL;
|
||||
tty_color_defaults__attrs = (attrs != NULL) ? g_strdup (attrs) : NULL;
|
||||
tty_color_defaults__fg = g_strdup (fgcolor);
|
||||
tty_color_defaults__bg = g_strdup (bgcolor);
|
||||
tty_color_defaults__attrs = g_strdup (attrs);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -354,7 +354,7 @@ vfs_translate_path_n (const char *path)
|
||||
const char *result;
|
||||
|
||||
result = vfs_translate_path (path);
|
||||
return (result != NULL) ? g_strdup (result) : NULL;
|
||||
return g_strdup (result);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -449,7 +449,7 @@ extfs_open_archive (int fstype, const char *name, struct archive **pparc)
|
||||
|
||||
current_archive = g_new (struct archive, 1);
|
||||
current_archive->fstype = fstype;
|
||||
current_archive->name = (name != NULL) ? g_strdup (name) : NULL;
|
||||
current_archive->name = g_strdup (name);
|
||||
current_archive->local_name = g_strdup (vfs_path_get_last_path_str (local_name_vpath));
|
||||
|
||||
if (local_name_vpath != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user