diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2026-02-15 14:41:20 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2026-02-15 15:15:30 +0100 |
| commit | b668e52c906b664b353d5a99cfa3ff36f73b341d (patch) | |
| tree | 85ab744c5dd15c21633b89a518ff001225c98494 /procps/nmeter.c | |
| parent | 9e8f8a196838b63acdbd2c9b48a2a333bc885e8b (diff) | |
| download | busybox-w32-b668e52c906b664b353d5a99cfa3ff36f73b341d.tar.gz busybox-w32-b668e52c906b664b353d5a99cfa3ff36f73b341d.tar.bz2 busybox-w32-b668e52c906b664b353d5a99cfa3ff36f73b341d.zip | |
*: placate warnings where strchr/strstr returns constant pointer
Newer glibc is now smarter and can propagate const-ness from those!
function old new delta
readtoken1 3111 3108 -3
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps/nmeter.c')
| -rw-r--r-- | procps/nmeter.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/procps/nmeter.c b/procps/nmeter.c index dca07eac6..fd8907aac 100644 --- a/procps/nmeter.c +++ b/procps/nmeter.c | |||
| @@ -913,7 +913,8 @@ int nmeter_main(int argc UNUSED_PARAM, char **argv) | |||
| 913 | // parameters as seen by e.g. ps. Making a copy... | 913 | // parameters as seen by e.g. ps. Making a copy... |
| 914 | cur = xstrdup(argv[0]); | 914 | cur = xstrdup(argv[0]); |
| 915 | while (1) { | 915 | while (1) { |
| 916 | char *param, *p; | 916 | char *param; |
| 917 | const char *p; | ||
| 917 | prev = cur; | 918 | prev = cur; |
| 918 | again: | 919 | again: |
| 919 | cur = strchr(cur, '%'); | 920 | cur = strchr(cur, '%'); |
| @@ -929,7 +930,7 @@ int nmeter_main(int argc UNUSED_PARAM, char **argv) | |||
| 929 | // format: %[foptstring] | 930 | // format: %[foptstring] |
| 930 | cur++; | 931 | cur++; |
| 931 | p = strchr(options, cur[0]); | 932 | p = strchr(options, cur[0]); |
| 932 | param = cur+1; | 933 | param = cur + 1; |
| 933 | while (cur[0] != ']') { | 934 | while (cur[0] != ']') { |
| 934 | if (!cur[0]) | 935 | if (!cur[0]) |
| 935 | bb_show_usage(); | 936 | bb_show_usage(); |
