summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2024-04-11 12:08:03 -0400
committerPeter Zhu <peter@peterzhu.ca>2024-04-11 12:08:03 -0400
commitf2369de2a4a0ffc5e40f6d55fa3ae811128432db (patch)
tree18d896fdb92dfc90402881000f70b93d5e558853
parentca81f5a5de4bf9a8445770edd13ab0a9321910bf (diff)
Remove redundant cast
ptr is already of the VALUE type, so we don't need to cast it.
-rw-r--r--gc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index 3e00c0af43..df3a3b8a77 100644
--- a/gc.c
+++ b/gc.c
@@ -4477,8 +4477,8 @@ id2ref(VALUE objid)
if (ptr == Qtrue) return Qtrue;
if (ptr == Qfalse) return Qfalse;
if (NIL_P(ptr)) return Qnil;
- if (FIXNUM_P(ptr)) return (VALUE)ptr;
- if (FLONUM_P(ptr)) return (VALUE)ptr;
+ if (FIXNUM_P(ptr)) return ptr;
+ if (FLONUM_P(ptr)) return ptr;
ptr = obj_id_to_ref(objid);
if ((ptr % sizeof(RVALUE)) == (4 << 2)) {