GNU/Weeb Mailing List <[email protected]>
 help / color / mirror / Atom feed
From: Ammar Faizi <[email protected]>
To: Alviro Iskandar Setiawan <[email protected]>
Cc: Ammar Faizi <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>
Subject: [PATCH ncns v1 0/2] ncns fixes
Date: Wed, 17 Aug 2022 08:09:40 +0700	[thread overview]
Message-ID: <[email protected]> (raw)

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


             reply	other threads:[~2022-08-17  1:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17  1:09 Ammar Faizi [this message]
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
2022-08-17 13:35 Ammar Faizi
2022-08-17 13:41 ` Alviro Iskandar Setiawan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox