diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-01-24 21:16:37 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-01-24 21:16:37 +0530 |
commit | 5e5ca2fc951471440db1cdcae87e54b65c5e4846 (patch) | |
tree | 04c119ba8f3b50ea12201c26adcf787ae7210f0d /src/nnn.c | |
parent | 278280a7410fe57ecc7979ab5cb4ea90c1b2c358 (diff) | |
download | nnn-5e5ca2fc951471440db1cdcae87e54b65c5e4846.tar.gz |
Remove extra loop
Diffstat (limited to 'src/nnn.c')
-rw-r--r-- | src/nnn.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -2293,16 +2293,13 @@ static bool show_help(char *path) start = end = helpstr; while (*end) { - while (*end != '\n') - ++end; - - if (start == end) { - ++end; - continue; + if (*end == '\n') { + dprintf(fd, "%*c%.*s", + xchartohex(*start), ' ', (int)(end - start), start + 1); + start = end + 1; } - dprintf(fd, "%*c%.*s", xchartohex(*start), ' ', (int)(end - start), start + 1); - start = ++end; + ++end; } dprintf(fd, "\nVOLUME: %s of ", coolsize(get_fs_info(path, FREE))); |