Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
19 lines
495 B
Diff
19 lines
495 B
Diff
gcc-7 newly detects this class of bugs.
|
|
In this particular case it's clear that the inention was
|
|
to detect if the string is non-NULL *and* non-empty.
|
|
|
|
|
|
diff --git a/unique/uniqueapp.c b/unique/uniqueapp.c
|
|
index b40a86c..66a7226 100644
|
|
--- a/unique/uniqueapp.c
|
|
+++ b/unique/uniqueapp.c
|
|
@@ -176,7 +176,7 @@ set_startup_id (UniqueBackend *backend,
|
|
{
|
|
gchar *id;
|
|
|
|
- if (startup_id && startup_id != '\0')
|
|
+ if (startup_id && *startup_id != '\0')
|
|
id = g_strdup (startup_id);
|
|
else
|
|
{
|