public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH ncns v1 0/2] ncns fixes
@ 2022-08-17  1:09 Ammar Faizi
  2022-08-17  1:09 ` [PATCH ncns v1 1/2] chnet: node: Only take the pointer of buffer when available Ammar Faizi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ammar Faizi @ 2022-08-17  1:09 UTC (permalink / raw)
  To: Alviro Iskandar Setiawan; +Cc: Ammar Faizi, GNU/Weeb Mailing List

Hi Al,

Two fixes this time:

1) Only take the pointer of buffer when available.

The call to `ch->ch_.read_buf()` may be undefined behavior if the
buffer hasn't been initialized. Don't touch this buffer and return
null if it's not guaranteed to be initialized.

2) Fix unused variable warning.

Fix this:

  ../chnet/chnet_node.cc: In function ‘void CHN_RingWaitCQE(const Napi::CallbackInfo&)’:
  ../chnet/chnet_node.cc:146:19: warning: variable ‘env’ set but not used [-Wunused-but-set-variable]
    146 |         Napi::Env env = info.Env();
        |                   ^~~

Signed-off-by: Ammar Faizi <[email protected]>
---

Ammar Faizi (2):
  chnet: node: Only take the pointer of buffer when available
  chnet: node: Fix unused variable warning

 chnet/chnet_node.cc | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)


base-commit: 2b40ff58ef9007013ec741d2d599869e4c0b46f2
-- 
Ammar Faizi


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-17  1:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-17  1:09 [PATCH ncns v1 0/2] ncns fixes Ammar Faizi
2022-08-17  1:09 ` [PATCH ncns v1 1/2] chnet: node: Only take the pointer of buffer when available Ammar Faizi
2022-08-17  1:09 ` [PATCH ncns v1 2/2] chnet: node: Fix unused variable warning Ammar Faizi
2022-08-17  1:14 ` [PATCH ncns v1 0/2] ncns fixes Alviro Iskandar Setiawan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox