HomeClusterLabs Projects

Refactor: remoted: Use g_strchug() in load_env_vars()
991cb0c49b6fUnpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Refactor: remoted: Use g_strchug() in load_env_vars()

Skipping (or now, stripping) leading whitespace is one fewer thing we
have to do ourselves. g_strchug() is defined to operate on a (gchar *),
but it modifies its argument in place without
allocating/rellocating/freeing memory, so it's safe.

Since find_env_var_name() only needs to return one pointer now, it
doesn't need output arguments.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Mar 7 2025, 5:59 PM
Parents
rP29207445666d: Refactor: remoted: Use getline() instead of fgets()
Branches
Unknown
Tags
Unknown

Event Timeline