diff options
author | Ulrich Drepper <drepper@redhat.com> | 2008-03-19 06:43:34 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2008-03-19 06:43:34 +0000 |
commit | 72e6cdfa2cd95240439c72705ab28a2eebb7d04e (patch) | |
tree | ae830b7817948dc795cc92ec98216c478dde57e3 /nis/nss_compat | |
parent | 354b75277bc86768eafbbf5f590deb27e0a71d89 (diff) | |
download | glibc-72e6cdfa2cd95240439c72705ab28a2eebb7d04e.tar.gz glibc-72e6cdfa2cd95240439c72705ab28a2eebb7d04e.tar.xz glibc-72e6cdfa2cd95240439c72705ab28a2eebb7d04e.zip |
Remove useless "if" before "free".
Diffstat (limited to 'nis/nss_compat')
-rw-r--r-- | nis/nss_compat/compat-pwd.c | 15 | ||||
-rw-r--r-- | nis/nss_compat/compat-spwd.c | 6 |
2 files changed, 7 insertions, 14 deletions
diff --git a/nis/nss_compat/compat-pwd.c b/nis/nss_compat/compat-pwd.c index df8f91eea0..669522f21a 100644 --- a/nis/nss_compat/compat-pwd.c +++ b/nis/nss_compat/compat-pwd.c @@ -116,16 +116,11 @@ init_nss_interface (void) static void give_pwd_free (struct passwd *pwd) { - if (pwd->pw_name != NULL) - free (pwd->pw_name); - if (pwd->pw_passwd != NULL) - free (pwd->pw_passwd); - if (pwd->pw_gecos != NULL) - free (pwd->pw_gecos); - if (pwd->pw_dir != NULL) - free (pwd->pw_dir); - if (pwd->pw_shell != NULL) - free (pwd->pw_shell); + free (pwd->pw_name); + free (pwd->pw_passwd); + free (pwd->pw_gecos); + free (pwd->pw_dir); + free (pwd->pw_shell); memset (pwd, '\0', sizeof (struct passwd)); } diff --git a/nis/nss_compat/compat-spwd.c b/nis/nss_compat/compat-spwd.c index a5977681f2..95f7355945 100644 --- a/nis/nss_compat/compat-spwd.c +++ b/nis/nss_compat/compat-spwd.c @@ -113,10 +113,8 @@ init_nss_interface (void) static void give_spwd_free (struct spwd *pwd) { - if (pwd->sp_namp != NULL) - free (pwd->sp_namp); - if (pwd->sp_pwdp != NULL) - free (pwd->sp_pwdp); + free (pwd->sp_namp); + free (pwd->sp_pwdp); memset (pwd, '\0', sizeof (struct spwd)); pwd->sp_warn = -1; |