summaryrefslogtreecommitdiff
path: root/bin/ksh/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ksh/edit.c')
-rw-r--r--bin/ksh/edit.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/ksh/edit.c b/bin/ksh/edit.c
index 3eed072deb1..ddc38800329 100644
--- a/bin/ksh/edit.c
+++ b/bin/ksh/edit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: edit.c,v 1.41 2015/09/01 13:12:31 tedu Exp $ */
+/* $OpenBSD: edit.c,v 1.42 2015/09/15 18:15:05 tedu Exp $ */
/*
* Command line editing - common code
@@ -307,10 +307,10 @@ x_print_expansions(int nwords, char *const *words, int is_command)
/* Special case for 1 match (prefix is whole word) */
if (nwords == 1)
- prefix_len = x_basename(words[0], (char *) 0);
+ prefix_len = x_basename(words[0], NULL);
/* Any (non-trailing) slashes in non-common word suffixes? */
for (i = 0; i < nwords; i++)
- if (x_basename(words[i] + prefix_len, (char *) 0) >
+ if (x_basename(words[i] + prefix_len, NULL) >
prefix_len)
break;
/* All in same directory? */
@@ -321,7 +321,7 @@ x_print_expansions(int nwords, char *const *words, int is_command)
XPinit(l, nwords + 1);
for (i = 0; i < nwords; i++)
XPput(l, words[i] + prefix_len);
- XPput(l, (char *) 0);
+ XPput(l, NULL);
}
}
@@ -477,7 +477,7 @@ x_command_glob(int flags, const char *str, int slen, char ***wordsp)
alloc(sizeof(struct path_order_info) * nwords, ATEMP);
for (i = 0; i < nwords; i++) {
info[i].word = words[i];
- info[i].base = x_basename(words[i], (char *) 0);
+ info[i].base = x_basename(words[i], NULL);
if (!last_info || info[i].base != last_info->base ||
strncmp(words[i], last_info->word, info[i].base) != 0) {
last_info = &info[i];
@@ -616,7 +616,7 @@ add_glob(const char *str, int slen)
bool saw_slash = false;
if (slen < 0)
- return (char *) 0;
+ return NULL;
toglob = str_nsave(str, slen + 1, ATEMP); /* + 1 for "*" */
toglob[slen] = '\0';
@@ -695,7 +695,7 @@ x_basename(const char *s, const char *se)
{
const char *p;
- if (se == (char *) 0)
+ if (se == NULL)
se = s + strlen(s);
if (s == se)
return 0;