You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Susan Hinrichs (JIRA)" <ji...@apache.org> on 2014/11/04 22:18:34 UTC
[jira] [Closed] (TS-1120) Use ink_zero / ats_zero instead of
calling memset when zeroing a variable or member.
[ https://issues.apache.org/jira/browse/TS-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Susan Hinrichs closed TS-1120.
------------------------------
Resolution: Fixed
Fix Version/s: (was: sometime)
5.2.0
> Use ink_zero / ats_zero instead of calling memset when zeroing a variable or member.
> ------------------------------------------------------------------------------------
>
> Key: TS-1120
> URL: https://issues.apache.org/jira/browse/TS-1120
> Project: Traffic Server
> Issue Type: Improvement
> Components: Cleanup
> Affects Versions: 3.1.2
> Reporter: Alan M. Carroll
> Priority: Minor
> Labels: cleanup, memory, safety
> Fix For: 5.2.0
>
>
> We have an inline template, ink_zero(foo) which does "memset(&foo, 0, sizeof(foo))". Because this is easy to mess up with a typo, the inline template should be used for safety and clarity. Also, the template should be renamed "ats_zero" to be consistent.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)