aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-04-23 01:13:02 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-04-23 01:13:02 +0530
commitcd4009dbf6ed9c3ff22cf84e2818d6c938692cee (patch)
tree701a360997a2ea819bc9d1d21126303ca0a768f0 /src
parentb0132ba4407d877c2dc95de4d833ba8dd735861c (diff)
downloadnnn-cd4009dbf6ed9c3ff22cf84e2818d6c938692cee.tar.gz
Remove redundant change for HOME
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 810f019..4208c1e 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -366,14 +366,12 @@ static char mv[] = "mvg -gi";
#endif
/* Common strings */
-#define STR_NOHOME_ID 0
-#define STR_INPUT_ID 1
-#define STR_INVBM_KEY 2
-#define STR_DATE_ID 3
-#define STR_TMPFILE 4
+#define STR_INPUT_ID 0
+#define STR_INVBM_KEY 1
+#define STR_DATE_ID 2
+#define STR_TMPFILE 3
static const char * const messages[] = {
- "HOME not set",
"no traversal",
"invalid key",
"%F %T %z",
@@ -1884,11 +1882,6 @@ static char *get_bm_loc(char *buf, int key)
for (; bookmark[r].key && r < BM_MAX; ++r) {
if (bookmark[r].key == key) {
if (bookmark[r].loc[0] == '~') {
- if (!home) {
- DPRINTF_S(messages[STR_NOHOME_ID]);
- return NULL;
- }
-
ssize_t count = xstrlcpy(buf, home, PATH_MAX);
xstrlcpy(buf + count - 1, bookmark[r].loc + 1, PATH_MAX - count - 1);
@@ -3195,7 +3188,7 @@ nochange:
case SEL_VISIT:
switch (sel) {
case SEL_CDHOME:
- home ? (dir = home) : (dir = path);
+ dir = home;
break;
case SEL_CDBEGIN:
dir = ipath;