src: use sizeof(var) instead of sizeof(type) by bnoordhuis · Pull Request #27038 · nodejs/node (original) (raw)

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation4 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

bnoordhuis

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

@bnoordhuis

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

@nodejs-github-bot

@nodejs-github-bot nodejs-github-bot added c++

Issues and PRs that require attention from people who are familiar with C++.

cares

Issues and PRs related to the c-ares dependency or the cares_wrap binding.

labels

Apr 1, 2019

addaleax

richardlau

cjihrig

santigimeno

@BridgeAR BridgeAR added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Apr 3, 2019

@nodejs-github-bot

@danbev

@danbev

danbev pushed a commit that referenced this pull request

Apr 4, 2019

@bnoordhuis @danbev

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

PR-URL: #27038 Reviewed-By: Anna Henningsen anna@addaleax.net Reviewed-By: Richard Lau riclau@uk.ibm.com Reviewed-By: Colin Ihrig cjihrig@gmail.com Reviewed-By: Santiago Gimeno santiago.gimeno@gmail.com

BethGriggs pushed a commit that referenced this pull request

Apr 4, 2019

@bnoordhuis @BethGriggs

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

PR-URL: #27038 Reviewed-By: Anna Henningsen anna@addaleax.net Reviewed-By: Richard Lau riclau@uk.ibm.com Reviewed-By: Colin Ihrig cjihrig@gmail.com Reviewed-By: Santiago Gimeno santiago.gimeno@gmail.com

BethGriggs pushed a commit that referenced this pull request

Apr 9, 2019

@bnoordhuis @BethGriggs

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

PR-URL: #27038 Reviewed-By: Anna Henningsen anna@addaleax.net Reviewed-By: Richard Lau riclau@uk.ibm.com Reviewed-By: Colin Ihrig cjihrig@gmail.com Reviewed-By: Santiago Gimeno santiago.gimeno@gmail.com Signed-off-by: Beth Griggs Bethany.Griggs@uk.ibm.com

BethGriggs pushed a commit that referenced this pull request

Apr 10, 2019

@bnoordhuis @BethGriggs

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

PR-URL: #27038 Reviewed-By: Anna Henningsen anna@addaleax.net Reviewed-By: Richard Lau riclau@uk.ibm.com Reviewed-By: Colin Ihrig cjihrig@gmail.com Reviewed-By: Santiago Gimeno santiago.gimeno@gmail.com Signed-off-by: Beth Griggs Bethany.Griggs@uk.ibm.com

Labels

author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

c++

Issues and PRs that require attention from people who are familiar with C++.

cares

Issues and PRs related to the c-ares dependency or the cares_wrap binding.