summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2018-10-22 21:46:22 +0300
committerJari Vetoniemi <mailroxas@gmail.com>2018-10-22 21:46:22 +0300
commit0322cba7799887e58f63f75e6e596d575a7d096a (patch)
tree96ad1c4b5fe132ec8df2570151e06f1ea4218887
parentf048561ba0207f581caad44dddc6b3c659356e8c (diff)
memview: Dont fallback on custom region file fail
-rw-r--r--src/memview.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/memview.c b/src/memview.c
index 21d7c49..39ee94b 100644
--- a/src/memview.c
+++ b/src/memview.c
@@ -603,7 +603,7 @@ main(int argc, char *argv[])
FILE *regions_file = NULL;
if (argc > 2 && !(regions_file = fopen(argv[2], "rb"))) {
err(EXIT_FAILURE, "fopen(%s)", argv[2]);
- } else {
+ } else if (argc == 2) {
char path[128];
snprintf(path, sizeof(path), "/proc/%u/maps", pid);
if (!(regions_file = fopen(path, "rb")))