From a9c0bfff368938e5f162835115daff1de1787a01 Mon Sep 17 00:00:00 2001
From: j8takagi <j8takagi@nifty.com>
Date: Sat, 19 Mar 2011 22:32:27 +0900
Subject: [PATCH] =?utf8?q?=E3=82=BD=E3=83=BC=E3=82=B9=E3=81=AE=E4=BF=AE?=
 =?utf8?q?=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

---
 src/label.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/label.c b/src/label.c
index 04a757d..69a37dc 100644
--- a/src/label.c
+++ b/src/label.c
@@ -122,18 +122,19 @@ void printlabel()
 {
     int i, s = 0;
     LABELTAB *p;
-    LABELARRAY *l[labelcnt];
+    LABELARRAY **l;
 
+    l = calloc_chk(labelcnt, sizeof(LABELARRAY **), "labels");
     for(i = 0; i < LABELTABSIZE; i++) {
         for(p = labels[i]; p != NULL; p = p->next) {
             assert(p->label != NULL);
-            l[s] = malloc_chk(sizeof(LABELARRAY), "l[]");
+            l[s] = malloc_chk(sizeof(LABELARRAY), "lables");
             if(p->prog == NULL) {
                 l[s]->prog = NULL;
             } else {
-                l[s]->prog = strdup_chk(p->prog, "l[].prog");
+                l[s]->prog = strdup_chk(p->prog, "labels.prog");
             }
-            l[s]->label = strdup_chk(p->label, "l[].label");
+            l[s]->label = strdup_chk(p->label, "labels.label");
             l[s++]->adr = p->adr;
         }
     }
-- 
2.18.0