Browse Source

Minor changes

master
Arun Prakash Jana 7 years ago
parent
commit
f59cd3e90f
No known key found for this signature in database GPG Key ID: A75979F35C080412
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      nnn.c

+ 7
- 7
nnn.c View File

@@ -436,11 +436,11 @@ spawn(char *file, char *arg1, char *arg2, char *dir, uchar flag)
static char * static char *
xgetenv(char *name, char *fallback) xgetenv(char *name, char *fallback)
{ {
char *value;

if (name == NULL) if (name == NULL)
return fallback; return fallback;
value = getenv(name);

char *value = getenv(name);

return value && value[0] ? value : fallback; return value && value[0] ? value : fallback;
} }


@@ -1683,9 +1683,9 @@ redraw(char *path)
static void static void
browse(char *ipath, char *ifilter) 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; char *mime, *dir, *tmp, *run, *env;
struct stat sb; struct stat sb;
int r, fd, presel; int r, fd, presel;
@@ -2317,7 +2317,7 @@ main(int argc, char *argv[])
{ {
char cwd[PATH_MAX], *ipath; char cwd[PATH_MAX], *ipath;
char *ifilter, *bmstr; char *ifilter, *bmstr;
int opt = 0;
int opt;


/* Confirm we are in a terminal */ /* Confirm we are in a terminal */
if (!isatty(0) || !isatty(1)) { if (!isatty(0) || !isatty(1)) {


Loading…
Cancel
Save