about summary refs log tree commit diff
path: root/locale
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-05-27 06:04:07 +0000
committerUlrich Drepper <drepper@redhat.com>2008-05-27 06:04:07 +0000
commit62605cbfcb3d2f118c9f64ce049220b82928e6d4 (patch)
tree0af0f74a35664879e6a6e455122e3eec1ba24d0d /locale
parent4b2c85c0b9a04b0ca4e4d031a5b92b2160f17bc3 (diff)
downloadglibc-62605cbfcb3d2f118c9f64ce049220b82928e6d4.tar.gz
glibc-62605cbfcb3d2f118c9f64ce049220b82928e6d4.tar.xz
glibc-62605cbfcb3d2f118c9f64ce049220b82928e6d4.zip
Remove useless more "if" tests before "free".
	* include/inline-hashtab.h (htab_delete): Likewise.
	* libio/freopen.c (freopen): Likewise.
	* libio/freopen64.c (freopen64): Likewise.
	* locale/programs/ld-collate.c (collate_read): Likewise.
	* misc/fstab.c (libc_freeres_fn): Likewise.
	* posix/glob.c (globfree): Likewise.
Diffstat (limited to 'locale')
-rw-r--r--locale/programs/ld-collate.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
index 7af3b8aa92..bf50e77aab 100644
--- a/locale/programs/ld-collate.c
+++ b/locale/programs/ld-collate.c
@@ -2961,8 +2961,7 @@ collate_read (struct linereader *ldfile, struct localedef_t *result,
 	      else
 		{
 		col_elem_free:
-		  if (symbol != NULL)
-		    free ((char *) symbol);
+		  free ((char *) symbol);
 		  free (arg->val.str.startmb);
 		  free (arg->val.str.startwc);
 		}
@@ -3142,8 +3141,7 @@ collate_read (struct linereader *ldfile, struct localedef_t *result,
 	      arg = lr_token (ldfile, charmap, result, repertoire, verbose);
 	      if (arg->tok != tok_bsymbol)
 		{
-		  if (newname != NULL)
-		    free ((char *) newname);
+		  free ((char *) newname);
 		  goto err_label;
 		}
 
@@ -3157,10 +3155,8 @@ collate_read (struct linereader *ldfile, struct localedef_t *result,
 			    "LC_COLLATE");
 
 		sym_equiv_free:
-		  if (newname != NULL)
-		    free ((char *) newname);
-		  if (symname != NULL)
-		    free ((char *) symname);
+		  free ((char *) newname);
+		  free ((char *) symname);
 		  break;
 		}
 	      if (symname == NULL)