summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-03-11 10:21:44 +0100
committerThomas Haller <thaller@redhat.com>2022-03-11 10:21:44 +0100
commit9c8a937280b6c3695c81f0ccd9f69376d62f739b (patch)
tree3cb981caea4521372d1bf7c7a36bf588bbb0716f
parent8fc40206ec37194624ab3d7a3327606f5d12d4fa (diff)
downloadNetworkManager-9c8a937280b6c3695c81f0ccd9f69376d62f739b.tar.gz
core/trivial: add code comment to nm_utils_stable_id_parse()
-rw-r--r--src/core/nm-core-utils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/nm-core-utils.c b/src/core/nm-core-utils.c
index e3ceb60fd8..c8b789b30a 100644
--- a/src/core/nm-core-utils.c
+++ b/src/core/nm-core-utils.c
@@ -3350,8 +3350,13 @@ nm_utils_stable_id_generated_complete(const char *stable_id_generated)
static void
_stable_id_append(GString *str, const char *substitution)
{
- if (!substitution)
+ if (!substitution) {
+ /* Would have been nicer to append "=NIL;" to differentiate between
+ * empty and NULL.
+ *
+ * Can't do that now, as it would change behavior. */
substitution = "";
+ }
g_string_append_printf(str, "=%zu{%s}", strlen(substitution), substitution);
}