diff options
Diffstat (limited to 'src/unparse.c')
| -rw-r--r-- | src/unparse.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/unparse.c b/src/unparse.c index d775128..6a4e9cd 100644 --- a/src/unparse.c +++ b/src/unparse.c @@ -27,7 +27,7 @@ static void put_node(strbuf *sb, const node *n); static void put_lit(strbuf *sb, const char *s, size_t len, bool quoted) { bool need = quoted && !len; for (size_t i = 0; i < len && quoted && !need; i++) - need = strchr(" \t\n;&|<>()$`\\\"'*?[#~=%", s[i]) != NULL; + need = strchr(" \t\n;&|<>()$`\\\"'*?[#~=%", s[i]) != nullptr; if (!need) { sb_put(sb, s, len); return; @@ -76,7 +76,7 @@ static void put_param(strbuf *sb, const param *pm) { /** * @brief Append the parts of one word. * @param sb Destination. - * @param p First part, or NULL. + * @param p First part, or nullptr. * @param raw The parts are an arithmetic expression: literal text is * written as is (it was never shell-quoted). */ @@ -114,7 +114,7 @@ static void put_parts(strbuf *sb, const wpart *p, bool raw) { /** * @brief Append a list of words separated by spaces. * @param sb Destination. - * @param w First word, or NULL. + * @param w First word, or nullptr. * @param first Whether nothing precedes the list on this command (no * leading space is wanted then). * @return false if anything was written, else `first` unchanged. @@ -135,7 +135,7 @@ static bool put_words(strbuf *sb, const word *w, bool first) { /** * @brief Append a command's redirections. * @param sb Destination. - * @param r First redirection, or NULL. + * @param r First redirection, or nullptr. */ static void put_redirs(strbuf *sb, const redir *r) { static const char *const ops[] = { @@ -163,7 +163,7 @@ static void put_redirs(strbuf *sb, const redir *r) { /** * @brief Append a command list that sits inside a compound command. * @param sb Destination. - * @param n The list, or NULL for an empty one. + * @param n The list, or nullptr for an empty one. */ static void put_body(strbuf *sb, const node *n) { if (n) @@ -220,7 +220,7 @@ static void put_cond(strbuf *sb, const cond *c) { /** * @brief Append the text of one command. * @param sb Destination. - * @param n The command. Must not be NULL. + * @param n The command. Must not be nullptr. */ static void put_node(strbuf *sb, const node *n) { switch (n->kind) { @@ -338,7 +338,7 @@ static void put_node(strbuf *sb, const node *n) { /** * @brief Rebuild the text of a command. - * @param n The command, or NULL. + * @param n The command, or nullptr. * @return Heap-allocated text. The caller frees it. */ char *node_text(const node *n) { |
