From 0322cba7799887e58f63f75e6e596d575a7d096a Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Mon, 22 Oct 2018 21:46:22 +0300 Subject: memview: Dont fallback on custom region file fail --- src/memview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"))) -- cgit v1.2.3