summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-06-23 03:15:55 +0900
committerGitHub <noreply@github.com>2023-06-23 03:15:55 +0900
commitb934976024ef4e1694ec47158d94bce0f6d003b7 (patch)
treed6b65723139d916891d740e5107f921b4beb861c /struct.c
parent52f8de4f21b147468567f422ac9551ae5c194164 (diff)
Prefer `0` over `NULL` as function pointers
SunC warns use of `NULL`, pointer to data as function pointers.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7972 Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/struct.c b/struct.c
index 7214402f59..93053f0ad5 100644
--- a/struct.c
+++ b/struct.c
@@ -1871,7 +1871,7 @@ rb_data_with(int argc, const VALUE *argv, VALUE self)
}
VALUE h = rb_struct_to_h(self);
- rb_hash_update_by(h, kwargs, NULL);
+ rb_hash_update_by(h, kwargs, 0);
return rb_class_new_instance_kw(1, &h, rb_obj_class(self), TRUE);
}