diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2015-12-21 04:57:51 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2015-12-21 04:57:51 +0000 |
commit | be242b8bda07352d4e211679a3f6acff7665e3eb (patch) | |
tree | 0a495d1e80eb8381b00e31dd98a5714047d55cb8 /bin | |
parent | a8d422f9f3df54fc22bfef01b46ee4de39c87ab8 (diff) |
Replace an ugly bit of pointer arithmetic with a conditional expression.
"seems sound" deraadt@
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ksh/misc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ksh/misc.c b/bin/ksh/misc.c index 547ad240ac2..2f02fbd7127 100644 --- a/bin/ksh/misc.c +++ b/bin/ksh/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.52 2015/12/14 13:59:42 tb Exp $ */ +/* $OpenBSD: misc.c,v 1.53 2015/12/21 04:57:50 mmcc Exp $ */ /* * Miscellaneous functions @@ -986,7 +986,7 @@ print_value_quoted(const char *s) } for (p = s; *p; p++) { if (*p == '\'') { - shprintf("'\\'" + 1 - inquote); + shprintf(inquote ? "'\\'" : "\\'"); inquote = 0; } else { if (!inquote) { |