Commit adbcda1e authored by Ben Noordhuis's avatar Ben Noordhuis Committed by Daniel Bevenius
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>
parent be45224f
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