diff options
author | Roland McGrath <roland@gnu.org> | 1996-05-24 21:42:06 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-05-24 21:42:06 +0000 |
commit | 41f27456aca79bb327a6312a801d6804b9e4197f (patch) | |
tree | 1ba8bbd37aaff62befb85753ae2419999ed2403b /login/getutline_r.c | |
parent | 613a76ff52a680e71db772306a260b9cb7f95b49 (diff) | |
download | glibc-41f27456aca79bb327a6312a801d6804b9e4197f.tar glibc-41f27456aca79bb327a6312a801d6804b9e4197f.tar.gz glibc-41f27456aca79bb327a6312a801d6804b9e4197f.tar.bz2 glibc-41f27456aca79bb327a6312a801d6804b9e4197f.zip |
Fri May 24 17:30:50 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* login/pututline_r.c: Use struct assignment instead of memcpy.
* login/getutline_r.c: Use strncmp instead of comparing two pointers
that will only be equal if you are overwriting the data and screwing
yourself anyway.
Diffstat (limited to 'login/getutline_r.c')
-rw-r--r-- | login/getutline_r.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/login/getutline_r.c b/login/getutline_r.c index 62c8c2fd66..84c77cb244 100644 --- a/login/getutline_r.c +++ b/login/getutline_r.c @@ -53,7 +53,8 @@ getutline_r (const struct utmp *line, struct utmp **utmp, /* Update position pointer. */ utmp_data->loc_utmp += sizeof (struct utmp); } - while (line->ut_line != utmp_data->ubuf.ut_line); + while (strncmp (line->ut_line, utmp_data->ubuf.ut_line, + sizeof line->ut_line)); *utmp = &utmp_data->ubuf; |