[Pdbg] [PATCH v2 09/11] pdbg/htm: Fix error checking condition for htm dump command
Amitay Isaacs
amitay at ozlabs.org
Thu Apr 12 16:01:58 AEST 2018
From: Cyril Bur <cyrilbur at gmail.com>
We only call into libpdbg with one HTM unit, libpdbg returns how many
HTM units it operated on. A successful calling of HTM dump would expect
a return value of 1, so not 1 is an error.
Signed-off-by: Cyril Bur <cyrilbur at gmail.com>
---
src/htm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/htm.c b/src/htm.c
index ab63108..80501c5 100644
--- a/src/htm.c
+++ b/src/htm.c
@@ -191,7 +191,7 @@ static int run_dump(enum htm_type type, int optind, int argc, char *argv[])
printf("Dumping HTM@");
print_htm_address(type, target);
- if (htm_dump(target, 0, filename) == 1) {
+ if (htm_dump(target, 0, filename) != 1) {
printf("Couldn't dump HTM@");
print_htm_address(type, target);
}
--
2.14.3
More information about the Pdbg
mailing list