mirror of
https://github.com/troglobit/finit.git
synced 2026-11-09 16:21:24 +00:00
Minor, reduce scope of local variable
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
195155a7f5
commit
fdf8e48c99
1 file changed
+4
-2
+4
-2
@@ -434,7 +434,6 @@ int cgroup_tree(char *path, char *pfx, int mode, int pos)
|
|||||||
pid_comm(pid, comm, sizeof(comm));
|
pid_comm(pid, comm, sizeof(comm));
|
||||||
if (pid_cmdline(pid, buf, sizeof(buf))) {
|
if (pid_cmdline(pid, buf, sizeof(buf))) {
|
||||||
char proc[ttcols];
|
char proc[ttcols];
|
||||||
int len;
|
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 1:
|
case 1:
|
||||||
@@ -456,6 +455,8 @@ int cgroup_tree(char *path, char *pfx, int mode, int pos)
|
|||||||
if (plain) {
|
if (plain) {
|
||||||
strlcat(row, proc, rplen);
|
strlcat(row, proc, rplen);
|
||||||
} else {
|
} else {
|
||||||
|
int len;
|
||||||
|
|
||||||
strlcat(row, CDIM, rlen);
|
strlcat(row, CDIM, rlen);
|
||||||
strlcat(row, proc, rlen);
|
strlcat(row, proc, rlen);
|
||||||
|
|
||||||
@@ -600,7 +601,6 @@ int show_cgtop(char *arg)
|
|||||||
uev_t timer, input, sigint, sigterm, sigquit;
|
uev_t timer, input, sigint, sigterm, sigquit;
|
||||||
char path[512];
|
char path[512];
|
||||||
uev_ctx_t ctx;
|
uev_ctx_t ctx;
|
||||||
int flags;
|
|
||||||
|
|
||||||
if (!arg)
|
if (!arg)
|
||||||
arg = FINIT_CGPATH;
|
arg = FINIT_CGPATH;
|
||||||
@@ -619,6 +619,8 @@ int show_cgtop(char *arg)
|
|||||||
uev_timer_init(&ctx, &timer, cgtop, arg, 1, ionce ? 0 : 1000);
|
uev_timer_init(&ctx, &timer, cgtop, arg, 1, ionce ? 0 : 1000);
|
||||||
|
|
||||||
if (!ionce && !plain) {
|
if (!ionce && !plain) {
|
||||||
|
int flags;
|
||||||
|
|
||||||
atexit(cleanup);
|
atexit(cleanup);
|
||||||
ttraw();
|
ttraw();
|
||||||
hidecursor();
|
hidecursor();
|
||||||
|
|||||||
Reference in new issue
Block a user