You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Igor Galić (Commented JIRA)" <ji...@apache.org> on 2011/10/05 17:41:35 UTC
[jira] [Commented] (TS-953) Consolidate string function calls
[ https://issues.apache.org/jira/browse/TS-953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121058#comment-13121058 ]
Igor Galić commented on TS-953:
-------------------------------
With r1174513 I've cleaned out the last bit of sensibly
cleanable code. -- Three things are left:
* ink_strncpy()/ink_strncat()
I'm considering to change the function definitions so they will
kindly suggest (rad as: #error) to use ink_strlcpy/ink_strlcat()
* lib/ts/mkdfa.c
lib/ts/ink_string.h is not C-clean. If I include it in lib/ts/mkdfa.c
I'll get:
In file included from ink_error.h:39:0,
from ink_string.h:40,
from mkdfa.c:30:
ink_defs.h:90:1: error: unknown type name ‘namespace’
ink_defs.h:90:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
In file included from ink_string.h:41:0,
from mkdfa.c:30:
ParseRules.h:80:1: error: unknown type name ‘class’
ParseRules.h:81:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
ParseRules.h:181:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
* proxy/PluginDB.cc
strncat/strncpy are used in the licensing code. That's very
convenient, because I'm planning to throw that code out. See:
http://mail-archives.apache.org/mod_mbox/trafficserver-dev/201109.mbox/%3c1a38eab2-af75-4cd9-bdda-b481155d519c@iris%3e
> Consolidate string function calls
> ---------------------------------
>
> Key: TS-953
> URL: https://issues.apache.org/jira/browse/TS-953
> Project: Traffic Server
> Issue Type: Task
> Affects Versions: 3.1.1
> Reporter: Igor Galić
> Assignee: Igor Galić
> Fix For: 3.1.1
>
>
> it would be a good idea to consolidate calls to
> strcpy() strncpy() ink_strncpy() ink_strlcpy()
> strcat() strncat() ink_strncat() ink_strlcat()
> Right now we have all of those floating around. It would be a good idea if we consistently used ink_strlcpy() and ink_strlcat() respectively.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira