Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 3.1.1
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Activity

        Hide
        Igor Galić added a comment - - edited

        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
        
        Show
        Igor Galić added a comment - - edited 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

          People

          • Assignee:
            Igor Galić
            Reporter:
            Igor Galić
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development