Remove redundant checks for g_strdup().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
родитель
20ab79ba00
Коммит
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)
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user