core/trivial: add code comment to nm_utils_stable_id_parse()

This commit is contained in:
Thomas Haller 2022-03-11 10:21:44 +01:00
parent 8fc40206ec
commit 9c8a937280
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -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);
}