[gnome-builder] flatpak: set branch to NULL if unspecified
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] flatpak: set branch to NULL if unspecified
- Date: Thu, 14 Mar 2019 18:19:22 +0000 (UTC)
commit 73195093413d544d8a3167c2aa9022f8d5f9345c
Author: Christian Hergert <chergert redhat com>
Date: Thu Mar 14 10:44:41 2019 -0700
flatpak: set branch to NULL if unspecified
We should not pass "" for the branch if it was not specified,
instead pass NULL for easier comparisons elsewhere.
src/plugins/flatpak/gbp-flatpak-util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/plugins/flatpak/gbp-flatpak-util.c b/src/plugins/flatpak/gbp-flatpak-util.c
index ffee1fee4..4b60733d5 100644
--- a/src/plugins/flatpak/gbp-flatpak-util.c
+++ b/src/plugins/flatpak/gbp-flatpak-util.c
@@ -122,7 +122,7 @@ gbp_flatpak_split_id (const gchar *str,
if (parts[i] != NULL)
{
- if (branch != NULL)
+ if (branch != NULL && !ide_str_empty0 (parts[i]))
*branch = g_strdup (parts[i]);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]