aboutsummaryrefslogtreecommitdiffstats
path: root/dir.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-02-07 14:14:05 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-02-07 14:24:19 +0900
commit115fec062ccf7c6d72c8d5f64b7a5d84c9fb2dd8 (patch)
tree24639dba7b24afdd604b5d8c5b9e9f06d3d91faa /dir.c
parent6ed1a5e0e62bbdadcf3d0c61fcfe0c5f8d01789b (diff)
downloadruby-115fec062ccf7c6d72c8d5f64b7a5d84c9fb2dd8.tar.gz
more on NULL versus functions.
Function pointers are not void*. See also ce4ea956d24eab5089a143bba38126f2b11b55b6 8427fca49bd85205f5a8766292dd893f003c0e48
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dir.c b/dir.c
index 0957800070..ea0edf5982 100644
--- a/dir.c
+++ b/dir.c
@@ -2714,7 +2714,7 @@ ruby_glob(const char *path, int flags, ruby_glob_func *func, VALUE arg)
{
ruby_glob_funcs_t funcs;
funcs.match = func;
- funcs.error = NULL;
+ funcs.error = 0;
return ruby_glob0(path, AT_FDCWD, 0, flags & ~GLOB_VERBOSE,
&funcs, arg, rb_ascii8bit_encoding());
}
@@ -2843,7 +2843,7 @@ ruby_brace_glob_with_enc(const char *str, int flags, ruby_glob_func *func, VALUE
flags &= ~GLOB_VERBOSE;
args.funcs.match = func;
- args.funcs.error = NULL;
+ args.funcs.error = 0;
args.value = arg;
args.flags = flags;
return ruby_brace_expand(str, flags, glob_brace, (VALUE)&args, enc, Qfalse);