tests: do not use plain 0 as NULL [smatch scan]

Likewise commit 8791804065.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2017-03-10 19:50:14 +00:00
parent 4ff3d13b43
commit 71f08e9706
No known key found for this signature in database
GPG Key ID: A9553245FDE9B739
7 changed files with 39 additions and 39 deletions

View File

@ -830,11 +830,11 @@ int colormode_or_err(const char *str, const char *errmsg)
int main(int argc, char *argv[])
{
static const struct option longopts[] = {
{ "mode", required_argument, 0, 'm' },
{ "color", required_argument, 0, 'c' },
{ "color-scheme", required_argument, 0, 'C' },
{ "name", required_argument, 0, 'n' },
{ NULL, 0, 0, 0 }
{ "mode", required_argument, NULL, 'm' },
{ "color", required_argument, NULL, 'c' },
{ "color-scheme", required_argument, NULL, 'C' },
{ "name", required_argument, NULL, 'n' },
{ NULL, 0, NULL, 0 }
};
int c, mode = UL_COLORMODE_UNDEF; /* default */
const char *color = "red", *name = NULL, *color_scheme = NULL;

View File

@ -333,10 +333,10 @@ int main(int argc, char *argv[])
int ncpus = 2048, rc, c;
static const struct option longopts[] = {
{ "ncpus", 1, 0, 'n' },
{ "mask", 1, 0, 'm' },
{ "range", 1, 0, 'r' },
{ NULL, 0, 0, 0 }
{ "ncpus", 1, NULL, 'n' },
{ "mask", 1, NULL, 'm' },
{ "range", 1, NULL, 'r' },
{ NULL, 0, NULL, 0 }
};
while ((c = getopt_long(argc, argv, "n:m:r:", longopts, NULL)) != -1) {

View File

@ -55,10 +55,10 @@ int main(int argc, char *argv[])
unsigned int sectorsize;
static const struct option longopts[] = {
{ "label", required_argument, 0, 'x' },
{ "device", required_argument, 0, 'd' },
{ "help", no_argument, 0, 'h' },
{ NULL, 0, 0, 0 },
{ "label", required_argument, NULL, 'x' },
{ "device", required_argument, NULL, 'd' },
{ "help", no_argument, NULL, 'h' },
{ NULL, 0, NULL, 0 },
};
setlocale(LC_ALL, ""); /* just to have enable UTF8 chars */

View File

@ -222,18 +222,18 @@ int main(int argc, char *argv[])
int parent_col = -1, id_col = -1;
static const struct option longopts[] = {
{ "maxout", 0, 0, 'm' },
{ "column", 1, 0, 'c' },
{ "nlines", 1, 0, 'n' },
{ "width", 1, 0, 'w' },
{ "tree-parent-column", 1, 0, 'p' },
{ "tree-id-column", 1, 0, 'i' },
{ "json", 0, 0, 'J' },
{ "raw", 0, 0, 'r' },
{ "export", 0, 0, 'E' },
{ "colsep", 1, 0, 'C' },
{ "help", 0, 0, 'h' },
{ NULL, 0, 0, 0 },
{ "maxout", 0, NULL, 'm' },
{ "column", 1, NULL, 'c' },
{ "nlines", 1, NULL, 'n' },
{ "width", 1, NULL, 'w' },
{ "tree-parent-column", 1, NULL, 'p' },
{ "tree-id-column", 1, NULL, 'i' },
{ "json", 0, NULL, 'J' },
{ "raw", 0, NULL, 'r' },
{ "export", 0, NULL, 'E' },
{ "colsep", 1, NULL, 'C' },
{ "help", 0, NULL, 'h' },
{ NULL, 0, NULL, 0 },
};
static const ul_excl_t excl[] = { /* rows and cols in ASCII order */

View File

@ -60,9 +60,9 @@ int main(int argc, char *argv[])
int c;
static const struct option longopts[] = {
{ "maxout", 0, 0, 'm' },
{ "width", 1, 0, 'w' },
{ NULL, 0, 0, 0 },
{ "maxout", 0, NULL, 'm' },
{ "width", 1, NULL, 'w' },
{ NULL, 0, NULL, 0 },
};
setlocale(LC_ALL, ""); /* just to have enable UTF8 chars */

View File

@ -162,16 +162,16 @@ int main(int argc, char *argv[])
static const struct option longopts[] = {
{ "ascii", 0, 0, 'i' },
{ "csv", 0, 0, 'c' },
{ "list", 0, 0, 'l' },
{ "noheadings", 0, 0, 'n' },
{ "pairs", 0, 0, 'p' },
{ "json", 0, 0, 'J' },
{ "raw", 0, 0, 'r' },
{ "range-start",1, 0, 'S' },
{ "range-end", 1, 0, 'E' },
{ NULL, 0, 0, 0 },
{ "ascii", 0, NULL, 'i' },
{ "csv", 0, NULL, 'c' },
{ "list", 0, NULL, 'l' },
{ "noheadings", 0, NULL, 'n' },
{ "pairs", 0, NULL, 'p' },
{ "json", 0, NULL, 'J' },
{ "raw", 0, NULL, 'r' },
{ "range-start",1, NULL, 'S' },
{ "range-end", 1, NULL, 'E' },
{ NULL, 0, NULL, 0 },
};
setlocale(LC_ALL, ""); /* just to have enable UTF8 chars */

View File

@ -146,7 +146,7 @@ static void *create_uuids(thread_t *th)
obj->pid = th->proc->pid;
obj->idx = th->index + i;;
}
return 0;
return NULL;
}
static void *thread_body(void *arg)