View Bug Activity | Format For Printing
The innermost 'if' statement is redundant in the following code: [login/utmpname.c] <<<< if (strcmp (file, __libc_utmp_file_name) != 0) { if (strcmp (file, default_file_name) == 0) { if (__libc_utmp_file_name != default_file_name) free ((char *) __libc_utmp_file_name); __libc_utmp_file_name = default_file_name; } >>>> If file is the same as the default one, but different from the __libc_utmp_file_name, then, by definition, __libc_utmp_file_name != default_file_name. The patch is provided below. Index: login/utmpname.c =================================================================== RCS file: /cvs/glibc/libc/login/utmpname.c,v retrieving revision 1.6 diff -u -r1.6 utmpname.c --- login/utmpname.c 13 Mar 2002 05:09:36 -0000 1.6 +++ login/utmpname.c 14 Jun 2006 07:45:05 -0000 @@ -50,7 +50,6 @@ { if (strcmp (file, default_file_name) == 0) { - if (__libc_utmp_file_name != default_file_name) free ((char *) __libc_utmp_file_name); __libc_utmp_file_name = default_file_name;
I changed this in CVS.