You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "pkarashchenko (via GitHub)" <gi...@apache.org> on 2023/05/19 14:16:53 UTC

[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #9309: Fix misc issues in code

pkarashchenko commented on code in PR #9309:
URL: https://github.com/apache/nuttx/pull/9309#discussion_r1199016275


##########
drivers/mtd/w25qxxxjv.c:
##########
@@ -628,14 +626,9 @@ static void w25qxxxjv_write_disable(FAR struct w25qxxxjv_dev_s *priv)
 
 static void w25qxxxjv_set_die(FAR struct w25qxxxjv_dev_s *priv, uint8_t die)
 {
-  char buff[1] =
-    {
-      die,
-    };
-
   w25qxxxjv_write_enable(priv);
   w25qxxxjv_command_write(priv->qspi, W25QXXXJV_SW_DIE_SELECT,
-                          (FAR const void *)buff, 1);
+                          (FAR const void *)&die, 1);

Review Comment:
   But `buff[1];` will also be a stack variable, isn't it?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org