[tracker] libtracker-common: Avoid unneeded NULL check
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-common: Avoid unneeded NULL check
- Date: Wed, 14 Dec 2016 19:43:52 +0000 (UTC)
commit 273434150437cc6b274c19af2a8a8a4523a36497
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Dec 14 19:50:15 2016 +0100
libtracker-common: Avoid unneeded NULL check
The tokens variable is ensured to be non-NULL here, no need to
check it.
src/libtracker-common/tracker-file-utils.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/libtracker-common/tracker-file-utils.c b/src/libtracker-common/tracker-file-utils.c
index 4de4181..64a004d 100644
--- a/src/libtracker-common/tracker-file-utils.c
+++ b/src/libtracker-common/tracker-file-utils.c
@@ -629,12 +629,8 @@ tracker_path_evaluate_name (const gchar *path)
* symbolic links to other places, returning only the REAL
* location.
*/
- if (tokens) {
- expanded = g_strjoinv (G_DIR_SEPARATOR_S, tokens);
- g_strfreev (tokens);
- } else {
- expanded = g_strdup (path);
- }
+ expanded = g_strjoinv (G_DIR_SEPARATOR_S, tokens);
+ g_strfreev (tokens);
/* Only resolve relative paths if there is a directory
* separator in the path, otherwise it is just a name.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]