Reduce the number of redundant checks

This commit is contained in:
Arun Prakash Jana 2020-02-01 22:00:53 +05:30
parent 2390ac7b74
commit 897f01c2c3
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -4972,6 +4972,13 @@ begin:
while (1) { while (1) {
redraw(path); redraw(path);
/* Display a one-time message */
if (g_listpath && (g_states & STATE_MSG)) {
g_states &= ~STATE_MSG;
printwait(messages[MSG_IGNORED], &presel);
}
nochange: nochange:
/* Exit if parent has exited */ /* Exit if parent has exited */
if (getppid() == 1) { if (getppid() == 1) {
@ -4989,13 +4996,6 @@ nochange:
return _FAILURE; return _FAILURE;
} }
/* Display a one-time message */
if (g_states & STATE_MSG) {
g_states &= ~STATE_MSG;
printwait(messages[MSG_IGNORED], &presel);
goto nochange;
}
sel = nextsel(presel); sel = nextsel(presel);
if (presel) if (presel)
presel = 0; presel = 0;