Unverified Commit a21bee77 authored by Ben Noordhuis's avatar Ben Noordhuis Committed by Beth Griggs
Browse files

src: use sizeof(var) instead of sizeof(type)

Change `memset(&s, 0, sizeof(type))` to `memset(&s, 0, sizeof(s))`.
The former is dangerous when the type of `s` changes.

PR-URL: https://github.com/nodejs/node/pull/27038


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarRichard Lau <riclau@uk.ibm.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarSantiago Gimeno <santiago.gimeno@gmail.com>
Signed-off-by: default avatarBeth Griggs <Bethany.Griggs@uk.ibm.com>
parent 2f1da920
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment