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
This commit is contained in:
Joe Lawrence 2016-12-19 16:57:41 -05:00
parent 0193dd51bd
commit 7a855df172

View File

@ -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;