From e0a709c9a0689acec5f27c480e74613025d1343c Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 23 Sep 2024 21:06:10 +0200 Subject: [PATCH] [ci skip] Clarify intention in phpdbg, removing one TODO comment The point of WATCH_ON_BUCKET is to watch for all 3 fields of the bucket, so the fallthrough is intended. --- sapi/phpdbg/phpdbg_watch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sapi/phpdbg/phpdbg_watch.c b/sapi/phpdbg/phpdbg_watch.c index 2f546a71d6064..10a06c1310d7e 100644 --- a/sapi/phpdbg/phpdbg_watch.c +++ b/sapi/phpdbg/phpdbg_watch.c @@ -138,10 +138,10 @@ const phpdbg_command_t phpdbg_watch_commands[] = { bool phpdbg_check_watch_diff(phpdbg_watchtype type, void *oldPtr, void *newPtr) { switch (type) { case WATCH_ON_BUCKET: - if (memcmp(&((Bucket *) oldPtr)->h, &((Bucket *) newPtr)->h, sizeof(Bucket) - sizeof(zval) /* key/val comparison */) != 0) { + if (memcmp(&((Bucket *) oldPtr)->h, &((Bucket *) newPtr)->h, sizeof(Bucket) - sizeof(zval) /* hash+key comparison */) != 0) { return 2; } - /* TODO: Is this intentional? */ + /* Fall through to also compare the value from the bucket. */ ZEND_FALLTHROUGH; case WATCH_ON_ZVAL: return memcmp(oldPtr, newPtr, sizeof(zend_value) + sizeof(uint32_t) /* value + typeinfo */) != 0;