diff options
Diffstat (limited to 'src/printf.c')
| -rw-r--r-- | src/printf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/printf.c b/src/printf.c index a7e60fa..3e33c53 100644 --- a/src/printf.c +++ b/src/printf.c @@ -99,7 +99,7 @@ typedef struct printf_state { * @brief Take the next argument, or an empty string when they have run out. */ static const char *next_arg(printf_state *pf) { - return *pf->args ? *pf->args++ : NULL; + return *pf->args ? *pf->args++ : nullptr; } /** @@ -171,7 +171,7 @@ static const char *copy_number(printf_state *pf, const char *f, char *spec, * @brief Handle one conversion. * @param pf printf state. * @param f Points just after the `%`. - * @return Position of the conversion character, or NULL to stop (an + * @return Position of the conversion character, or nullptr to stop (an * error, or `\c` in a `%b` argument). */ static const char *convert(printf_state *pf, const char *f) { @@ -243,13 +243,13 @@ static const char *convert(printf_state *pf, const char *f) { out_printf(&out1, spec, mem.buf); free(mem.buf); if (!more) - return NULL; + return nullptr; break; } default: sh_warn("printf: %%%c: invalid directive", *f ? *f : ' '); pf->status = 1; - return NULL; + return nullptr; } return f; } |
