Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.162
 
1.163
 
MAIN:plunky:20120905142109
 
local.c
_>10541054 }
 10551055 
 10561056 static char *
<>1057 -section2string(char *name, int len)
  1057+section2string(char *name)
10581058 {
<>1059 -#if defined(ELFABI)
 1060 -        char *s;
 1061 -        int n;
  1059+        int len = strlen(name);
10621060 
<> 1061+#if defined(ELFABI)
10631062         if (strncmp(name, "link_set", 8) == 0) {
<>1064 -                const char *postfix = ",\"aw\",@progbits";
 1065 -                n = len + strlen(postfix) + 1;
 1066 -                s = IALLOC(n);
 1067 -                strlcpy(s, name, n);
 1068 -                strlcat(s, postfix, n);
  1063+                const char postfix[] = ",\"aw\",@progbits";
  1064+                char *s;
  1065+
  1066+                s = IALLOC(len + sizeof(postfix));
  1067+                strcpy(s, name);
  1068+                strcpy(s + len, postfix);
10691069                 return s;
 10701070         }
 10711071 #endif
     
 !
11321132         }
 11331133 #endif
 11341134         if (strcmp(str, "section") == 0 && a2 != NULL) {
<>1135 -                nextsect = section2string(a2, strlen(a2));
  1135+                nextsect = section2string(a2);
<_11361136                 return 1;
 11371137         }
 11381138         if (strcmp(str, "alias") == 0 && a2 != NULL) {
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-09-30 19:53 +0200