summary refs log tree commit diff
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2015-01-06 01:59:53 +0100
committerMikael Magnusson <mikachu@gmail.com>2015-01-06 23:46:55 +0100
commit6c72895bc2e8fc3a6bc98ba089390b4d2fb12dde (patch)
treea7a877a45c434f65426c4db9d9fbcb2138e37f8a
parent9e5dc2925ce7898880682495e4058abd22adf9f3 (diff)
downloadzsh-6c72895bc2e8fc3a6bc98ba089390b4d2fb12dde.tar.gz
zsh-6c72895bc2e8fc3a6bc98ba089390b4d2fb12dde.tar.xz
zsh-6c72895bc2e8fc3a6bc98ba089390b4d2fb12dde.zip
34105: subst: remove dead code
Found by Coverity (Issue 1255810).
-rw-r--r--ChangeLog2
-rw-r--r--Src/subst.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 46f1826c6..72013066d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2015-01-06  Mikael Magnusson  <mikachu@gmail.com>
 
+	* 34105: Src/subst.c: remove dead code
+
 	* 34121: Src/Zle/compresult.c: Remove unneeded NULL check
 
 	* 34104: Src/Zle/compctl.c: Remove pointless check
diff --git a/Src/subst.c b/Src/subst.c
index 610d71ee2..5f993d6fd 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -1317,7 +1317,7 @@ get_intarg(char **s, int *delmatchp)
     if (ret < 0)
 	ret = -ret;
     *delmatchp = arglen;
-    return ret < 0 ? -ret : ret;
+    return ret;
 }
 
 /* Parsing for the (e) flag. */