diff options
author | Michael Brown | 2013-04-28 17:51:05 +0200 |
---|---|---|
committer | Michael Brown | 2013-04-28 18:13:44 +0200 |
commit | b9663b80497d8954a2195789c91ba2f27c8e2d6b (patch) | |
tree | ab39fb8d86da9a90e4dd79b02e18ceeff3aa13bc /src/hci | |
parent | [build] Use -Wno-decl when running sparse (diff) | |
download | ipxe-b9663b80497d8954a2195789c91ba2f27c8e2d6b.tar.gz ipxe-b9663b80497d8954a2195789c91ba2f27c8e2d6b.tar.xz ipxe-b9663b80497d8954a2195789c91ba2f27c8e2d6b.zip |
[build] Fix uses of literal 0 as a NULL pointer
Detected using sparse.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/hci')
-rw-r--r-- | src/hci/linux_args.c | 6 | ||||
-rw-r--r-- | src/hci/mucurses/kb.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/hci/linux_args.c b/src/hci/linux_args.c index 0bce4af9..58eeb063 100644 --- a/src/hci/linux_args.c +++ b/src/hci/linux_args.c @@ -45,9 +45,9 @@ __asmcall void save_args(int argc, char **argv) /** Supported command-line options */ static struct option options[] = { - {"net", 1, 0, 'n'}, - {"settings", 1, 0, 's'}, - {0, 0, 0, 0} + {"net", 1, NULL, 'n'}, + {"settings", 1, NULL, 's'}, + {NULL, 0, NULL, 0} }; /** diff --git a/src/hci/mucurses/kb.c b/src/hci/mucurses/kb.c index cada7291..b38c8c14 100644 --- a/src/hci/mucurses/kb.c +++ b/src/hci/mucurses/kb.c @@ -88,7 +88,7 @@ int wgetnstr ( WINDOW *win, char *str, int n ) { int c; if ( n == 0 ) { - str = '\0'; + *str = '\0'; return OK; } |