commit 727b2a5236346e75ec6455179d5073e348d165be
parent a2b162d46e59b8f52659afb6e9a43a187b423a3b
Author: Érico Rolim <erico.erc@gmail.com>
Date: Wed, 26 Aug 2020 21:00:34 -0300
chpst: fix undefined operation on sequence point.
Based on patch from
https://salsa.debian.org/debian/runit/-/blob/77a49befd7c1a08bfe0613454e540562529811fa/debian/patches/0016-fix-warning-for-undefined-operation-on-sequence-poin.patch
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/chpst.c b/src/chpst.c
@@ -308,7 +308,8 @@ int main(int argc, const char **argv) {
case 'n':
switch (*optarg) {
case '-':
- if (optarg[scan_ulong(++optarg, &ul)]) usage(); nicelvl =ul;
+ ++optarg;
+ if (optarg[scan_ulong(optarg, &ul)]) usage(); nicelvl =ul;
nicelvl *=-1;
break;
case '+': ++optarg;