From 0a3a73cf3d19e4519d0cf72aa1d1c48273218ea9 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 29 Apr 2006 16:14:48 +0000 Subject: [PATCH] Recent s_char purge changed element types to s_char *, but missed patterns malloc(N * sizeof(s_char *)), fix. --- src/lib/commands/path.c | 2 +- src/lib/commands/rout.c | 2 +- src/lib/commands/sect.c | 2 +- src/lib/commands/surv.c | 2 +- src/lib/common/maps.c | 2 +- src/lib/subs/radmap.c | 2 +- src/lib/subs/satmap.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/commands/path.c b/src/lib/commands/path.c index 61818ee7..568585e4 100644 --- a/src/lib/commands/path.c +++ b/src/lib/commands/path.c @@ -84,7 +84,7 @@ path(void) if (!mapbuf) mapbuf = malloc(WORLD_Y * MAPWIDTH(3)); if (!map) { - map = malloc(WORLD_Y * sizeof(s_char *)); + map = malloc(WORLD_Y * sizeof(char *)); if (map && mapbuf) { for (i = 0; i < WORLD_Y; i++) map[i] = &mapbuf[MAPWIDTH(3) * i]; diff --git a/src/lib/commands/rout.c b/src/lib/commands/rout.c index 0e06bbbf..6d05b6f8 100644 --- a/src/lib/commands/rout.c +++ b/src/lib/commands/rout.c @@ -77,7 +77,7 @@ rout(void) if (!mapbuf) mapbuf = malloc(WORLD_Y * MAPWIDTH(3)); if (!map) { - map = malloc(WORLD_Y * sizeof(s_char *)); + map = malloc(WORLD_Y * sizeof(char *)); if (map && mapbuf) { for (i = 0; i < WORLD_Y; i++) map[i] = &mapbuf[MAPWIDTH(3) * i]; diff --git a/src/lib/commands/sect.c b/src/lib/commands/sect.c index c05a5c5c..ed3c285f 100644 --- a/src/lib/commands/sect.c +++ b/src/lib/commands/sect.c @@ -68,7 +68,7 @@ sct(void) if (!mapbuf) mapbuf = malloc(WORLD_Y * MAPWIDTH(1)); if (!map) { - map = malloc(WORLD_Y * sizeof(s_char *)); + map = malloc(WORLD_Y * sizeof(char *)); if (map && mapbuf) { for (i = 0; i < WORLD_Y; i++) map[i] = &mapbuf[MAPWIDTH(1) * i]; diff --git a/src/lib/commands/surv.c b/src/lib/commands/surv.c index 462ef0a3..910091e5 100644 --- a/src/lib/commands/surv.c +++ b/src/lib/commands/surv.c @@ -90,7 +90,7 @@ surv(void) if (!mapbuf) mapbuf = malloc(WORLD_Y * MAPWIDTH(1)); if (!map) { - map = malloc(WORLD_Y * sizeof(s_char *)); + map = malloc(WORLD_Y * sizeof(char *)); if (map && mapbuf) { for (i = 0; i < WORLD_Y; i++) map[i] = &mapbuf[MAPWIDTH(1) * i]; diff --git a/src/lib/common/maps.c b/src/lib/common/maps.c index 198b582c..b19640dc 100644 --- a/src/lib/common/maps.c +++ b/src/lib/common/maps.c @@ -73,7 +73,7 @@ draw_map(int bmap, s_char origin, int map_flags, struct nstr_sect *nsp) if (!wmapbuf) wmapbuf = malloc(WORLD_Y * MAPWIDTH(1)); if (!wmap) { - wmap = malloc(WORLD_Y * sizeof(s_char *)); + wmap = malloc(WORLD_Y * sizeof(char *)); if (wmap && wmapbuf) { for (i = 0; i < WORLD_Y; i++) wmap[i] = &wmapbuf[MAPWIDTH(1) * i]; diff --git a/src/lib/subs/radmap.c b/src/lib/subs/radmap.c index 9a1cbbb6..d353f17b 100644 --- a/src/lib/subs/radmap.c +++ b/src/lib/subs/radmap.c @@ -93,7 +93,7 @@ radmap2(int owner, if (!visbuf) visbuf = malloc(WORLD_Y * (WORLD_X + 1)); if (!rad) { - rad = malloc(WORLD_Y * sizeof(s_char *)); + rad = malloc(WORLD_Y * sizeof(char *)); if (rad && radbuf) { for (x = 0; x < WORLD_Y; x++) rad[x] = &radbuf[(WORLD_X + 1) * x]; diff --git a/src/lib/subs/satmap.c b/src/lib/subs/satmap.c index 6aa6af99..1191c0f5 100644 --- a/src/lib/subs/satmap.c +++ b/src/lib/subs/satmap.c @@ -73,7 +73,7 @@ satmap(int x, int y, int eff, int range, int flags, int type) if (!radbuf) radbuf = malloc(WORLD_Y * (WORLD_X + 1)); if (!rad) { - rad = malloc(WORLD_Y * sizeof(s_char *)); + rad = malloc(WORLD_Y * sizeof(char *)); if (rad && radbuf) { for (rx = 0; rx < WORLD_Y; rx++) rad[rx] = &radbuf[(WORLD_X + 1) * rx];