summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--Src/Zle/compresult.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 489d6f858..46f1826c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2015-01-06  Mikael Magnusson  <mikachu@gmail.com>
 
+	* 34121: Src/Zle/compresult.c: Remove unneeded NULL check
+
 	* 34104: Src/Zle/compctl.c: Remove pointless check
 
 	* 34115: Src/Zle/compcore.c: Fix size argument to zfree
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
index 93438a053..dbef7f841 100644
--- a/Src/Zle/compresult.c
+++ b/Src/Zle/compresult.c
@@ -1098,7 +1098,7 @@ do_single(Cmatch m)
 		} else {
 		    p = (char *) zhalloc(strlen(prpre) + strlen(str) +
 				 strlen(psuf) + 3);
-		    sprintf(p, "%s%s%s", ((prpre && *prpre) ?
+		    sprintf(p, "%s%s%s", (*prpre ?
 					  prpre : "./"), str, psuf);
 		}
 		/* And do the stat. */