login.c bug?
Cristian Ionescu-Idbohrn
cristian.ionescu-idbohrn at axis.com
Thu Oct 12 08:38:09 UTC 2006
The statement [1] in functions: read_or_build_utent and write_utent
is (IMHO) nonsensical.
Function read_or_build_utent: the utent structure is 1st zeroed (using
memset) and then zeroed [1] again. Does it need to?
Function write_utent: sets [1] again (and is also doing more than
documented a few lines above).
I would have expected something like:
if (time(&utent.ut_time) == -1) {
<error handling>
}
instead of plain [1], to make it usable. Current behaviour was
introduced in r16075 (see diff -r16074:16075).
Thoughts?
Cheers,
Cristian
[1] utent.ut_time = time(NULL);
More information about the busybox
mailing list