src/filemanager/chattr.c: fix coding style.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2024-09-22 11:36:56 +03:00
parent b0ce42e55b
commit 6e95a0be43

View File

@ -288,10 +288,9 @@ fileattrtext_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, vo
{ {
case MSG_DRAW: case MSG_DRAW:
{ {
int color; int color = COLOR_NORMAL;
size_t i; size_t i;
color = COLOR_NORMAL;
tty_setcolor (color); tty_setcolor (color);
if (w->rect.cols > fat->filename_width) if (w->rect.cols > fat->filename_width)
@ -488,10 +487,9 @@ chattrboxes_rename (WChattrBoxes *cb)
for (i = cb->top, l = GROUP (cb)->widgets; l != NULL; i++, l = g_list_next (l)) for (i = cb->top, l = GROUP (cb)->widgets; l != NULL; i++, l = g_list_next (l))
{ {
WCheck *c = CHECK (l->data); WCheck *c = CHECK (l->data);
int m; int m = check_attr_mod[i];
char btext[BUF_SMALL]; /* FIXME: are 128 bytes enough? */ char btext[BUF_SMALL]; /* FIXME: are 128 bytes enough? */
m = check_attr_mod[i];
g_snprintf (btext, sizeof (btext), "(%c) %s", check_attr[m].attr, check_attr[m].text); g_snprintf (btext, sizeof (btext), "(%c) %s", check_attr[m].attr, check_attr[m].text);
check_set_text (c, btext); check_set_text (c, btext);
c->state = check_attr[m].state; c->state = check_attr[m].state;
@ -514,9 +512,8 @@ checkboxes_save_state (const WChattrBoxes *cb)
for (i = cb->top, l = CONST_GROUP (cb)->widgets; l != NULL; i++, l = g_list_next (l)) for (i = cb->top, l = CONST_GROUP (cb)->widgets; l != NULL; i++, l = g_list_next (l))
{ {
int m; int m = check_attr_mod[i];
m = check_attr_mod[i];
check_attr[m].state = CHECK (l->data)->state; check_attr[m].state = CHECK (l->data)->state;
} }
} }
@ -895,11 +892,9 @@ chattrboxes_new (const WRect *r)
/* create checkboxes */ /* create checkboxes */
for (i = 0; i < r->lines; i++) for (i = 0; i < r->lines; i++)
{ {
int m; int m = check_attr_mod[i];
WCheck *check; WCheck *check;
m = check_attr_mod[i];
check = check_new (i, 0, check_attr[m].state, NULL); check = check_new (i, 0, check_attr[m].state, NULL);
group_add_widget (cbg, check); group_add_widget (cbg, check);
} }