[asterisk-dev] [Code Review] 3273: Corrected cross-platform stat nanosecond code.

rmudgett reviewboard at asterisk.org
Thu Feb 27 11:18:41 CST 2014



> On Feb. 27, 2014, 10:51 a.m., wdoekes wrote:
> > /branches/1.8/main/config.c, lines 1102-1103
> > <https://reviewboard.asterisk.org/r/3273/diff/1/?file=54883#file54883line1102>
> >
> >     Setting nsec isn't needed. It's calloc'ed to 0 anyway.
> >     
> >     And #warning's are not used anywhere else in the codebase (except for the obscure cel_tds backend), so I'm not sure we should start adding those.

This function cannot make the assumption that the memory is already zeroed.  Setting to zero is required because cfmstat_cmp() does not calloc the struct.  The struct is a local variable from the stack.


- rmudgett


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3273/#review10974
-----------------------------------------------------------


On Feb. 27, 2014, 10:37 a.m., David Lee wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3273/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2014, 10:37 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> When nanosecond time resolution was added for identifying config file
> changes, it didn't cover all of the myriad of ways that one might obtain
> nanosecond time resolution off of struct stat.
> 
> Rather than complicate the #if even further figuring out one system from
> the next, this patch directly tests for the three struct members I know
> about today, and #ifdef's accordingly.
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/main/config.c 409079 
>   /branches/1.8/include/asterisk/autoconfig.h.in 409079 
>   /branches/1.8/configure.ac 409079 
>   /branches/1.8/configure UNKNOWN 
> 
> Diff: https://reviewboard.asterisk.org/r/3273/diff/
> 
> 
> Testing
> -------
> 
> Compiled on Ubuntu 13.10 and OS X 10.9.2.
> 
> 
> Thanks,
> 
> David Lee
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140227/c0c9824e/attachment.html>


More information about the asterisk-dev mailing list