]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
chfn: use null character (0) for better readability
authorChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Wed, 14 Jan 2026 04:45:03 +0000 (23:45 -0500)
committerKarel Zak <kzak@redhat.com>
Thu, 29 Jan 2026 11:13:11 +0000 (12:13 +0100)
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
login-utils/chfn.c

index 27bdddaaa2c72cfc0114e7a1494fffb4da3f106d..2096f24254aa06b52f3404222650f034fa0daa5f 100644 (file)
@@ -374,7 +374,7 @@ static int save_new_data(struct chfn_control *ctl)
        if (!ctl->newf.other || !*ctl->newf.other) {
                while (len > 0 && gecos[len - 1] == ',')
                        len--;
-               gecos[len] = 0;
+               gecos[len] = '\0';
        }
 
 #ifdef HAVE_LIBUSER