git: 660d6c5c3d63 - main - procstat: Remove set but unused variable.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 20 Jun 2023 16:29:34 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=660d6c5c3d639bdb0902b8ca6cb9b3b8d5b8ccd7
commit 660d6c5c3d639bdb0902b8ca6cb9b3b8d5b8ccd7
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-06-20 16:29:00 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-06-20 16:29:00 +0000
procstat: Remove set but unused variable.
---
usr.bin/procstat/procstat_files.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/usr.bin/procstat/procstat_files.c b/usr.bin/procstat/procstat_files.c
index 01b09d54bccd..87995c7602a4 100644
--- a/usr.bin/procstat/procstat_files.c
+++ b/usr.bin/procstat/procstat_files.c
@@ -267,10 +267,9 @@ width_capability(cap_rights_t *rightsp)
static void
print_capability(cap_rights_t *rightsp, u_int capwidth)
{
- u_int count, i, width;
+ u_int count, i;
count = 0;
- width = 0;
for (i = width_capability(rightsp); i < capwidth; i++) {
if (i != 0)
xo_emit(" ");
@@ -282,9 +281,6 @@ print_capability(cap_rights_t *rightsp, u_int capwidth)
if (cap_rights_is_set(rightsp, cap_desc[i].cd_right)) {
xo_emit("{D:/%s}{l:capabilities/%s}", count ? "," : "",
cap_desc[i].cd_desc);
- width += strlen(cap_desc[i].cd_desc);
- if (count)
- width++;
count++;
}
}