[Cryptech-Commits] [sw/libhal] 55/58: NULL-terminate string list, doh.

git at cryptech.is git at cryptech.is
Tue Jul 7 18:25:39 UTC 2015


This is an automated email from the git hooks/post-receive script.

sra at hactrn.net pushed a commit to branch master
in repository sw/libhal.

commit 526e451fe43a8e3de4f7d35bc7beb833f5bd6ac1
Author: Rob Austein <sra at hactrn.net>
Date:   Sun Jul 5 16:21:51 2015 -0400

    NULL-terminate string list, doh.
---
 GNUmakefile           | 2 +-
 utils/eim_peek_poke.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/GNUmakefile b/GNUmakefile
index 6f98b45..870d536 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -58,7 +58,7 @@ clean:
 	cd utils; ${MAKE} $@
 
 distclean: clean
-	rm TAGS
+	rm -f TAGS
 
 tags: TAGS
 
diff --git a/utils/eim_peek_poke.c b/utils/eim_peek_poke.c
index 9a8143c..a6316fe 100644
--- a/utils/eim_peek_poke.c
+++ b/utils/eim_peek_poke.c
@@ -91,7 +91,7 @@ int main(int argc, char *argv[])
   off_t offset = 0;
   uint32_t value;
 
-  if (argc == 1 || string_match(argv[1], "-?", "-h", "--help"))
+  if (argc == 1 || string_match(argv[1], "-?", "-h", "--help", NULL))
     usage(EXIT_SUCCESS, argv[0]);
 
   if (eim_setup() != 0) {
@@ -99,14 +99,14 @@ int main(int argc, char *argv[])
     return EXIT_FAILURE;
   }
 
-  if (string_match(argv[1], "r", "-r", "--read", "--peek")) {
+  if (string_match(argv[1], "r", "-r", "--read", "--peek", NULL)) {
     if (argc != 3 || !parse_offset(argv[2], &offset))
       usage(EXIT_FAILURE, argv[0]);
     eim_read_32(offset, &value);
     printf("%08x\n", value);
   }
 
-  else if (string_match(argv[1], "w", "-w", "--write", "--poke")) {
+  else if (string_match(argv[1], "w", "-w", "--write", "--poke", NULL)) {
     if (argc != 4 || !parse_offset(argv[2], &offset) || !parse_value(argv[3], &value))
       usage(EXIT_FAILURE, argv[0]);
     eim_write_32(offset, &value);



More information about the Commits mailing list