Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit af57990

Browse filesBrowse files
bnoordhuisgibfahn
authored andcommitted
src: fix bad sizeof expression
It was computing the size of the pointer, not the size of the pointed-to object. Introduced in commit 727b291 ("src,dns: refactor cares_wrap to avoid global state".) PR-URL: #17014 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent ab46b8e commit af57990
Copy full SHA for af57990

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎src/cares_wrap.cc‎

Copy file name to clipboardExpand all lines: src/cares_wrap.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class ChannelWrap : public AsyncWrap {
158158
}
159159
inline node_ares_task_list* task_list() { return &task_list_; }
160160

161-
size_t self_size() const override { return sizeof(this); }
161+
size_t self_size() const override { return sizeof(*this); }
162162

163163
static void AresTimeout(uv_timer_t* handle);
164164

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.