You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/04/06 19:31:07 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #5948: libc/lib_localtime:fix deadcode

pkarashchenko commented on code in PR #5948:
URL: https://github.com/apache/incubator-nuttx/pull/5948#discussion_r844322767


##########
libs/libc/time/lib_localtime.c:
##########
@@ -1585,14 +1583,7 @@ static int tzparse(FAR const char *name, FAR struct state_s *sp,
                    * offset.
                    */
 
-                  if (isdst && !sp->ttis[j].tt_ttisstd)

Review Comment:
   It's just very similar for me to the bug that I fixed for IO expander some time ago in https://github.com/apache/incubator-nuttx/pull/5680 by replacing `if (values[i] && (priv->invert & (1 << pin)) == 0)` with `if (values[i] == (((priv->invert >> pin) & 1) == 0))`.
   @anjiahao1 @xiaoxiang781216 could you please analyze code more carefully. I still think that we should modify condition from `if (isdst && !sp->ttis[j].tt_ttisstd)` to `if (isdst == !sp->ttis[j].tt_ttisstd)` instead of removing the code.



-- 
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