diff options
-rw-r--r-- | grp/fgetgrent.c | 3 | ||||
-rw-r--r-- | inet/getnetgrent.c | 5 | ||||
-rw-r--r-- | misc/mntent.c | 5 | ||||
-rw-r--r-- | nss/getXXbyYY.c | 23 | ||||
-rw-r--r-- | nss/getXXent.c | 17 | ||||
-rw-r--r-- | pwd/fgetpwent.c | 5 | ||||
-rw-r--r-- | shadow/fgetspent.c | 5 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/getsysstats.c | 3 |
8 files changed, 29 insertions, 37 deletions
diff --git a/grp/fgetgrent.c b/grp/fgetgrent.c index 69507d9..ba69c10 100644 --- a/grp/fgetgrent.c +++ b/grp/fgetgrent.c @@ -89,8 +89,7 @@ fgetgrent (FILE *stream) static void __attribute__ ((unused)) free_mem (void) { - if (buffer != NULL) - free (buffer); + free (buffer); } text_set_element (__libc_subfreeres, free_mem); diff --git a/inet/getnetgrent.c b/inet/getnetgrent.c index 88b06ff..2f32ec6 100644 --- a/inet/getnetgrent.c +++ b/inet/getnetgrent.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -56,8 +56,7 @@ static void __attribute__ ((unused)) free_mem (void) { - if (buffer != NULL) - free (buffer); + free (buffer); } text_set_element (__libc_subfreeres, free_mem); diff --git a/misc/mntent.c b/misc/mntent.c index b21f24e..41267d7 100644 --- a/misc/mntent.c +++ b/misc/mntent.c @@ -1,5 +1,5 @@ /* Utilities for reading/writing fstab, mtab, etc. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -60,8 +60,7 @@ static void __attribute__ ((unused)) free_mem (void) { - if (getmntent_buffer != NULL) - free (getmntent_buffer); + free (getmntent_buffer); } text_set_element (__libc_subfreeres, free_mem); diff --git a/nss/getXXbyYY.c b/nss/getXXbyYY.c index 32327d6..ebddb98 100644 --- a/nss/getXXbyYY.c +++ b/nss/getXXbyYY.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -26,26 +26,26 @@ /*******************************************************************\ |* Here we assume several symbols to be defined: *| -|* *| +|* *| |* LOOKUP_TYPE - the return type of the function *| -|* *| +|* *| |* FUNCTION_NAME - name of the non-reentrant function *| -|* *| +|* *| |* DATABASE_NAME - name of the database the function accesses *| |* (e.g., host, services, ...) *| -|* *| +|* *| |* ADD_PARAMS - additional parameter, can vary in number *| -|* *| +|* *| |* ADD_VARIABLES - names of additional parameter *| -|* *| +|* *| |* BUFLEN - length of buffer allocated for the non *| |* reentrant version *| -|* *| +|* *| |* Optionally the following vars can be defined: *| -|* *| +|* *| |* NEED_H_ERRNO - an extra parameter will be passed to point to *| |* the global `h_errno' variable. *| -|* *| +|* *| \*******************************************************************/ /* To make the real sources a bit prettier. */ @@ -164,8 +164,7 @@ done: static void __attribute__ ((unused)) free_mem (void) { - if (buffer != NULL) - free (buffer); + free (buffer); } text_set_element (__libc_subfreeres, free_mem); diff --git a/nss/getXXent.c b/nss/getXXent.c index 497c0de..d248215 100644 --- a/nss/getXXent.c +++ b/nss/getXXent.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -24,18 +24,18 @@ /*******************************************************************\ |* Here we assume several symbols to be defined: *| -|* *| +|* *| |* LOOKUP_TYPE - the return type of the function *| -|* *| +|* *| |* GETFUNC_NAME - name of the non-reentrant getXXXent function *| -|* *| +|* *| |* BUFLEN - size of static buffer *| -|* *| +|* *| |* Optionally the following vars can be defined: *| -|* *| +|* *| |* NEED_H_ERRNO - an extra parameter will be passed to point to *| |* the global `h_errno' variable. *| -|* *| +|* *| \*******************************************************************/ /* To make the real sources a bit prettier. */ @@ -121,8 +121,7 @@ GETFUNC_NAME (void) static void __attribute__ ((unused)) free_mem (void) { - if (buffer != NULL) - free (buffer); + free (buffer); } text_set_element (__libc_subfreeres, free_mem); diff --git a/pwd/fgetpwent.c b/pwd/fgetpwent.c index 09a13c3..31aff45 100644 --- a/pwd/fgetpwent.c +++ b/pwd/fgetpwent.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1996, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -89,8 +89,7 @@ fgetpwent (FILE *stream) static void __attribute__ ((unused)) free_mem (void) { - if (buffer != NULL) - free (buffer); + free (buffer); } text_set_element (__libc_subfreeres, free_mem); diff --git a/shadow/fgetspent.c b/shadow/fgetspent.c index 66a5452..78f6bb2 100644 --- a/shadow/fgetspent.c +++ b/shadow/fgetspent.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -92,8 +92,7 @@ fgetspent (FILE *stream) static void __attribute__ ((unused)) free_mem (void) { - if (buffer != NULL) - free (buffer); + free (buffer); } text_set_element (__libc_subfreeres, free_mem); diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c index 9d01376..a4113ce 100644 --- a/sysdeps/unix/sysv/linux/getsysstats.c +++ b/sysdeps/unix/sysv/linux/getsysstats.c @@ -283,7 +283,6 @@ weak_alias (__get_avphys_pages, get_avphys_pages) static void free_mem (void) { - if (mount_proc != NULL) - free (mount_proc); + free (mount_proc); } text_set_element (__libc_subfreeres, free_mem); |