Remove the unnecessary allocation of and assignment to hunk[3], as the
Nicholas Clark [Mon, 23 Apr 2007 16:36:31 +0000 (16:36 +0000)]
perl API functions called don't need a NUL terminated string.

p4raw-id: //depot/perl@31038

pp_pack.c

index f2f79f1..8e49932 100644 (file)
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -2106,9 +2106,8 @@ S_unpack_rec(pTHX_ tempsym_t* symptr, const char *s, const char *strbeg, const c
            if (utf8) {
                while (next_uni_uu(aTHX_ &s, strend, &len)) {
                    I32 a, b, c, d;
-                   char hunk[4];
+                   char hunk[3];
 
-                   hunk[3] = '\0';
                    while (len > 0) {
                        next_uni_uu(aTHX_ &s, strend, &a);
                        next_uni_uu(aTHX_ &s, strend, &b);
@@ -2135,9 +2134,8 @@ S_unpack_rec(pTHX_ tempsym_t* symptr, const char *s, const char *strbeg, const c
            } else {
                while (s < strend && *s > ' ' && ISUUCHAR(*s)) {
                    I32 a, b, c, d;
-                   char hunk[4];
+                   char hunk[3];
 
-                   hunk[3] = '\0';
                    len = PL_uudmap[*(U8*)s++] & 077;
                    while (len > 0) {
                        if (s < strend && ISUUCHAR(*s))