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 2021/07/02 11:01:55 UTC

[GitHub] [incubator-nuttx] fjpanag commented on pull request #4032: syslog: fix crash when print localtime by syslog

fjpanag commented on pull request #4032:
URL: https://github.com/apache/incubator-nuttx/pull/4032#issuecomment-872912717


   @Donny9 What was the problem with this? I tried it, but I didn't have any kind of "crash", it worked OK for me.
   
   I am following the changes, but I don't understand the functional changes this PR brings. It seems to me only "styling" changes are made. Can you please elaborate on the issue and the solution?
   
   Also, to my understanding this PR introduces a bug.
   If `OSINIT_HW_READY()` returns false, then the variable `tm` will be used uninitialized in line 132.  
   The same applies for variable `ts` in line 140.
   
   Also, why ingore the return code of the various calls in `clock_gettime()`, `clock_gettime(), `clock_systime_timespec()`?  
   Isn't it better to check for the error, and provide sane values in `ts` and `tm`?
   


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