mirror of https://github.com/MidnightCommander/mc
* chmod.c (chmod_callback): Fix uninitialized variable.
This commit is contained in:
parent
60dda91b9f
commit
9653eb538f
|
@ -1,3 +1,7 @@
|
|||
2003-09-12 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* chmod.c (chmod_callback): Fix uninitialized variable.
|
||||
|
||||
2003-09-11 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* main.c (midnight_callback): Don't redraw dirty panels if the
|
||||
|
|
|
@ -151,12 +151,10 @@ static cb_ret_t
|
|||
chmod_callback (Dlg_head *h, dlg_msg_t msg, int parm)
|
||||
{
|
||||
char buffer[BUF_TINY];
|
||||
int id;
|
||||
int id = h->current->dlg_id - BUTTONS + single_set * 2;
|
||||
|
||||
switch (msg) {
|
||||
case DLG_ACTION:
|
||||
id = h->current->dlg_id - BUTTONS + single_set * 2;
|
||||
|
||||
if (id >= 0) {
|
||||
c_stat ^= check_perm[id].mode;
|
||||
g_snprintf (buffer, sizeof (buffer), "%o", c_stat);
|
||||
|
@ -167,8 +165,7 @@ chmod_callback (Dlg_head *h, dlg_msg_t msg, int parm)
|
|||
return MSG_HANDLED;
|
||||
|
||||
case DLG_KEY:
|
||||
if ((parm == 'T' || parm == 't' || parm == KEY_IC)
|
||||
&& h->current->dlg_id >= BUTTONS - single_set * 2) {
|
||||
if ((parm == 'T' || parm == 't' || parm == KEY_IC) && id > 0) {
|
||||
chmod_toggle_select (h, id);
|
||||
if (parm == KEY_IC)
|
||||
dlg_one_down (h);
|
||||
|
|
Loading…
Reference in New Issue