This patch removes uncessary argument checking before calling g_strdup()
If an argument of g_strdup() is NULL, its return value is also NULL.
So, checking its argument before calling is duplicated and useless.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
*/
const gchar *tmp = g_getenv (name);
- return (tmp != NULL) ? g_strdup (tmp) : NULL;
+ return g_strdup (tmp);
}
/**
g_hash_table_insert (custom_table, hashkey, value);
}
- return (value != NULL) ? g_strdup (value) : NULL;
+ return g_strdup (value);
}
/** @brief Public function defined in the header */
g_return_if_fail (dest != NULL);
g_return_if_fail (src != NULL);
- dest->name = (src->name) ? g_strdup (src->name) : NULL;
+ dest->name = g_strdup (src->name);
dest->type = src->type;
for (i = 0; i < n; i++) {