helper: with pointers, use NULL instead of 0
Don't compare pointers with 0, use NULL when needed. Don't assign pointer to 0, use NULL. Don't pass 0 ad pointer argument, pass NULL. Detected through 'sparse' tool. Change-Id: I3f867cb9c0903f6e396311e7b3970ee5fb3a4231 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7597 Tested-by: jenkins
This commit is contained in:
@@ -39,12 +39,12 @@ static int help_flag, version_flag;
|
||||
static const struct option long_options[] = {
|
||||
{"help", no_argument, &help_flag, 1},
|
||||
{"version", no_argument, &version_flag, 1},
|
||||
{"debug", optional_argument, 0, 'd'},
|
||||
{"file", required_argument, 0, 'f'},
|
||||
{"search", required_argument, 0, 's'},
|
||||
{"log_output", required_argument, 0, 'l'},
|
||||
{"command", required_argument, 0, 'c'},
|
||||
{0, 0, 0, 0}
|
||||
{"debug", optional_argument, NULL, 'd'},
|
||||
{"file", required_argument, NULL, 'f'},
|
||||
{"search", required_argument, NULL, 's'},
|
||||
{"log_output", required_argument, NULL, 'l'},
|
||||
{"command", required_argument, NULL, 'c'},
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
int configuration_output_handler(struct command_context *context, const char *line)
|
||||
|
||||
Reference in New Issue
Block a user