diff options
| author | 2014-10-22 16:53:38 +0100 | |
|---|---|---|
| committer | 2014-10-22 16:53:38 +0100 | |
| commit | bc690212332bc9f461f75876606054c82fe34445 (patch) | |
| tree | fa37accabacd953f18696d1342de3c0dcb18d367 | |
| parent | 05957936f5a7e452f4b8cda5bf50e92e745c4187 (diff) | |
| download | nnn-bc690212332bc9f461f75876606054c82fe34445.tar.gz | |
Save one level of indentation
| -rw-r--r-- | noice.c | 32 |
1 files changed, 15 insertions, 17 deletions
@@ -577,26 +577,24 @@ nochange: return; case SEL_BACK: /* There is no going back */ - if (strcmp(path, "/") == 0) { + if (strcmp(path, "/") == 0) goto nochange; + dir = xdirname(path); + free(path); + path = dir; + free(filter); + filter = xstrdup(ifilter); /* Reset filter */ + /* Recall history */ + hist = SLIST_FIRST(&histhead); + if (hist != NULL) { + cur = hist->pos; + DPRINTF_D(hist->pos); + SLIST_REMOVE_HEAD(&histhead, entry); + free(hist); } else { - dir = xdirname(path); - free(path); - path = dir; - free(filter); - filter = xstrdup(ifilter); /* Reset filter */ - /* Recall history */ - hist = SLIST_FIRST(&histhead); - if (hist != NULL) { - cur = hist->pos; - DPRINTF_D(hist->pos); - SLIST_REMOVE_HEAD(&histhead, entry); - free(hist); - } else { - cur = 0; - } - goto out; + cur = 0; } + goto out; case SEL_GOIN: /* Cannot descend in empty directories */ if (n == 0) |