From 7a855df172b0247b35d82822e6c385144abe084a Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Mon, 19 Dec 2016 16:57:41 -0500 Subject: [PATCH] sparse: use "NULL" for NULL pointers Fixes sparse complaints: create-diff-object.c:2302:24: warning: Using plain integer as NULL pointer create-diff-object.c:2303:11: warning: Using plain integer as NULL pointer create-diff-object.c:2334:59: warning: Using plain integer as NULL pointer create-diff-object.c:2347:43: warning: Using plain integer as NULL pointer --- kpatch-build/create-diff-object.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c index b5e56b9..26395df 100644 --- a/kpatch-build/create-diff-object.c +++ b/kpatch-build/create-diff-object.c @@ -2299,8 +2299,8 @@ struct arguments { static char args_doc[] = "original.o patched.o kernel-object output.o"; static struct argp_option options[] = { - {"debug", 'd', 0, 0, "Show debug output" }, - { 0 } + {"debug", 'd', NULL, 0, "Show debug output" }, + { NULL } }; static error_t parse_opt (int key, char *arg, struct argp_state *state) @@ -2331,7 +2331,7 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state) return 0; } -static struct argp argp = { options, parse_opt, args_doc, 0 }; +static struct argp argp = { options, parse_opt, args_doc, NULL }; int main(int argc, char *argv[]) { @@ -2344,7 +2344,7 @@ int main(int argc, char *argv[]) char *hint = NULL, *name, *pos; arguments.debug = 0; - argp_parse (&argp, argc, argv, 0, 0, &arguments); + argp_parse (&argp, argc, argv, 0, NULL, &arguments); if (arguments.debug) loglevel = DEBUG;