Remove redundant checks for g_strdup().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2013-09-17 12:48:11 +04:00
parent 20ab79ba00
commit e78b1fdf66
3 changed files with 5 additions and 5 deletions

View File

@ -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);
}
/* --------------------------------------------------------------------------------------------- */

View File

@ -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);
}
/* --------------------------------------------------------------------------------------------- */

View File

@ -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)