aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-06-21 09:49:02 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-06-21 09:49:02 +0530
commitf59cd3e90f6ca291d55c11149df99fef15cc1c98 (patch)
tree508f17f15168d48a2ce12ecd48a0d0a4f490a56d
parent3da053cbfaae10fc251d637a64c45814dd0eb935 (diff)
downloadnnn-f59cd3e90f6ca291d55c11149df99fef15cc1c98.tar.gz
Minor changes
-rw-r--r--nnn.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/nnn.c b/nnn.c
index 148ca5b..e52dd16 100644
--- a/nnn.c
+++ b/nnn.c
@@ -436,11 +436,11 @@ spawn(char *file, char *arg1, char *arg2, char *dir, uchar flag)
static char *
xgetenv(char *name, char *fallback)
{
- char *value;
-
if (name == NULL)
return fallback;
- value = getenv(name);
+
+ char *value = getenv(name);
+
return value && value[0] ? value : fallback;
}
@@ -1683,9 +1683,9 @@ redraw(char *path)
static void
browse(char *ipath, char *ifilter)
{
- static char path[PATH_MAX], oldpath[PATH_MAX], newpath[PATH_MAX];
- static char lastdir[PATH_MAX];
- static char fltr[LINE_MAX];
+ char path[PATH_MAX], oldpath[PATH_MAX], newpath[PATH_MAX];
+ char lastdir[PATH_MAX];
+ char fltr[LINE_MAX];
char *mime, *dir, *tmp, *run, *env;
struct stat sb;
int r, fd, presel;
@@ -2317,7 +2317,7 @@ main(int argc, char *argv[])
{
char cwd[PATH_MAX], *ipath;
char *ifilter, *bmstr;
- int opt = 0;
+ int opt;
/* Confirm we are in a terminal */
if (!isatty(0) || !isatty(1)) {