diff options
author | Mikael Magnusson <mikachu@gmail.com> | 2015-01-05 14:29:03 +0100 |
---|---|---|
committer | Mikael Magnusson <mikachu@gmail.com> | 2015-01-06 23:46:49 +0100 |
commit | 9e5dc2925ce7898880682495e4058abd22adf9f3 (patch) | |
tree | 7aa8131f1e3fbf13e352157b238611ffd409bcb6 /Src/Zle/compresult.c | |
parent | ea6bb993e980171454708dd89847553a30d17dd9 (diff) | |
download | zsh-9e5dc2925ce7898880682495e4058abd22adf9f3.tar.gz zsh-9e5dc2925ce7898880682495e4058abd22adf9f3.tar.xz zsh-9e5dc2925ce7898880682495e4058abd22adf9f3.zip |
34121: compresult: Remove unneeded NULL check
The variable is set to if NULL at the start of the function, and derefed on the previous line. Found by Coverity (Issue 1255843).
Diffstat (limited to 'Src/Zle/compresult.c')
-rw-r--r-- | Src/Zle/compresult.c | 2 |
1 files changed, 1 insertions, 1 deletions
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. */ |