summaryrefslogtreecommitdiff
path: root/login
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-07-28 20:45:36 +0000
committerUlrich Drepper <drepper@redhat.com>2007-07-28 20:45:36 +0000
commitcedb4109571cff4416235df260848de77f09f556 (patch)
treee170e2abca7478ed85d71a5efe34f861a112b90a /login
parent9d9febc7952c43f90fd81ce185e4b1a74cb13375 (diff)
downloadglibc-cedb4109571cff4416235df260848de77f09f556.tar.gz
* locale/programs/ld-monetary.c (monetary_finish): Avoid range check
for int_frac_digits and frac_digits. * login/logout.c (logout): Avoid aliasing violation. * login/logwtmp.c (logwtmp): Likewise. * libio/genops.c (_IO_un_link): Avoid aliasing violation.
Diffstat (limited to 'login')
-rw-r--r--login/logout.c7
-rw-r--r--login/logwtmp.c13
2 files changed, 5 insertions, 15 deletions
diff --git a/login/logout.c b/login/logout.c
index 020ff6189a..8902036c5e 100644
--- a/login/logout.c
+++ b/login/logout.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2002, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -51,15 +51,10 @@ logout (const char *line)
bzero (ut->ut_host, sizeof ut->ut_host);
#endif
#if _HAVE_UT_TV - 0
- if (sizeof (ut->ut_tv) == sizeof (struct timeval))
- __gettimeofday ((struct timeval *) &ut->ut_tv, NULL);
- else
- {
struct timeval tv;
__gettimeofday (&tv, NULL);
ut->ut_tv.tv_sec = tv.tv_sec;
ut->ut_tv.tv_usec = tv.tv_usec;
- }
#else
ut->ut_time = time (NULL);
#endif
diff --git a/login/logwtmp.c b/login/logwtmp.c
index 96ef05d795..ff2e7f9887 100644
--- a/login/logwtmp.c
+++ b/login/logwtmp.c
@@ -44,15 +44,10 @@ logwtmp (const char *line, const char *name, const char *host)
#endif
#if _HAVE_UT_TV - 0
- if (sizeof (ut.ut_tv) == sizeof (struct timeval))
- __gettimeofday ((struct timeval *) &ut.ut_tv, NULL);
- else
- {
- struct timeval tv;
- __gettimeofday (&tv, NULL);
- ut.ut_tv.tv_sec = tv.tv_sec;
- ut.ut_tv.tv_usec = tv.tv_usec;
- }
+ struct timeval tv;
+ __gettimeofday (&tv, NULL);
+ ut.ut_tv.tv_sec = tv.tv_sec;
+ ut.ut_tv.tv_usec = tv.tv_usec;
#else
ut.ut_time = time (NULL);
#endif