diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2023-06-29 15:27:21 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2023-06-29 15:29:29 -0700 |
| commit | 16b5ca6e0df165bd8b9c2d8c7e4bc7d1b7efa25d (patch) | |
| tree | 665d2e8164077b316fcfc5efa7d9915a145bd8bb /src/coreutils.c | |
| parent | build: ensure that makeinfo ≥ 6.8 checks the @menu structure (diff) | |
| download | coreutils-16b5ca6e0df165bd8b9c2d8c7e4bc7d1b7efa25d.tar.gz coreutils-16b5ca6e0df165bd8b9c2d8c7e4bc7d1b7efa25d.zip | |
maint: prefer C23-style nullptr
* bootstrap.conf (gnulib_modules): Add nullptr.
In code, prefer nullptr to NULL where either will do.
Diffstat (limited to 'src/coreutils.c')
| -rw-r--r-- | src/coreutils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/coreutils.c b/src/coreutils.c index e9ae1d18c..87308efae 100644 --- a/src/coreutils.c +++ b/src/coreutils.c @@ -51,7 +51,7 @@ static struct option const long_options[] = { {GETOPT_HELP_OPTION_DECL}, {GETOPT_VERSION_OPTION_DECL}, - {NULL, 0, NULL, 0} + {nullptr, 0, nullptr, 0} }; @@ -95,7 +95,7 @@ Use: '%s --coreutils-prog=PROGRAM_NAME --help' for individual program help.\n"), static void launch_program (char const *prog_name, int prog_argc, char **prog_argv) { - int (*prog_main) (int, char **) = NULL; + int (*prog_main) (int, char **) = nullptr; /* Ensure that at least one parameter was passed. */ if (!prog_argc || !prog_argv || !prog_argv[0] || !prog_name) @@ -153,7 +153,7 @@ main (int argc, char **argv) if (argc >= 2) { size_t nskip = 0; - char *arg_name = NULL; + char *arg_name = nullptr; /* If calling coreutils directly, the "script" name isn't passed. Distinguish the two cases with a -shebang suffix. */ @@ -190,7 +190,7 @@ main (int argc, char **argv) textdomain (PACKAGE); atexit (close_stdout); - if ((optc = getopt_long (argc, argv, "", long_options, NULL)) != -1) + if ((optc = getopt_long (argc, argv, "", long_options, nullptr)) != -1) switch (optc) { case_GETOPT_HELP_CHAR; |
