about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--posix/wordexp.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index be6268ad75..3da106bbfb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-12-23  Ulrich Drepper  <drepper@redhat.com>
+
+	* posix/wordexp.c: Remove some unnecessary tests.
+
 2006-12-22  Gavin Romig-Koch  <gavin@redhat.com>
 
 	* nis/nss_compat/compat-grp.c (internal_getgrgid_r): Don't
diff --git a/posix/wordexp.c b/posix/wordexp.c
index adece95ef8..765d14d81f 100644
--- a/posix/wordexp.c
+++ b/posix/wordexp.c
@@ -1809,7 +1809,7 @@ envsubst:
 	    /* Substitute parameter */
 	    break;
 
-	  if (free_value && value)
+	  if (free_value)
 	    free (value);
 
 	  if (!colon_seen && value)
@@ -1827,7 +1827,7 @@ envsubst:
 	case ACT_NONNULL_SUBST:
 	  if (value && (*value || !colon_seen))
 	    {
-	      if (free_value && value)
+	      if (free_value)
 		free (value);
 
 	      value = pattern ? __strdup (pattern) : pattern;