summaryrefslogtreecommitdiffhomepage
path: root/src/cond.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cond.c')
-rw-r--r--src/cond.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cond.c b/src/cond.c
index 842e945..472adbc 100644
--- a/src/cond.c
+++ b/src/cond.c
@@ -47,7 +47,7 @@ static const char *operand(const word *w) {
* expression?
*/
static bool is_ere_special(char c) {
- return strchr("\\.[]()*+?{}|^$", c) != NULL;
+ return strchr("\\.[]()*+?{}|^$", c) != nullptr;
}
/**
@@ -65,7 +65,7 @@ static const char *regex_text(const word *w) {
sb_init(&sb, &scratch);
for (const wpart *p = w->parts; p; p = p->next) {
wpart one = *p;
- one.next = NULL;
+ one.next = nullptr;
const char *s = expand_string(&one, 0);
if (!p->quoted) {
sb_puts(&sb, s);
@@ -94,7 +94,7 @@ static int regex_match(const char *s, const char *re) {
sh_warn("[[: %s: %s", re, msg);
return 2;
}
- rc = regexec(&rx, s, 0, NULL, 0);
+ rc = regexec(&rx, s, 0, nullptr, 0);
regfree(&rx);
return rc == 0 ? 0 : 1;
}
@@ -111,7 +111,7 @@ static bool unary(char op, const char *arg) {
case 'o':
return option_is_set(arg) == 1;
case 'v':
- return var_get(arg) != NULL;
+ return var_get(arg) != nullptr;
default:
return test_unary(op, arg);
}