Page MenuHomeFreeBSD

D46011.diff
No OneTemporary

D46011.diff

diff --git a/usr.bin/ministat/ministat.c b/usr.bin/ministat/ministat.c
--- a/usr.bin/ministat/ministat.c
+++ b/usr.bin/ministat/ministat.c
@@ -152,7 +152,7 @@
ds = calloc(1, sizeof *ds);
assert(ds != NULL);
ds->lpoints = 100000;
- ds->points = calloc(sizeof *ds->points, ds->lpoints);
+ ds->points = calloc(ds->lpoints, sizeof(*ds->points));
assert(ds->points != NULL);
ds->syy = NAN;
return(ds);
@@ -166,7 +166,7 @@
if (ds->n >= ds->lpoints) {
dp = ds->points;
ds->lpoints *= 4;
- ds->points = calloc(sizeof *ds->points, ds->lpoints);
+ ds->points = calloc(ds->lpoints, sizeof(*ds->points));
assert(ds->points != NULL);
memcpy(ds->points, dp, sizeof *dp * ds->n);
free(dp);
@@ -355,7 +355,7 @@
bar = 0;
if (pl->bar == NULL) {
- pl->bar = calloc(sizeof(char *), pl->num_datasets);
+ pl->bar = calloc(pl->num_datasets, sizeof(char *));
assert(pl->bar != NULL);
}

File Metadata

Mime Type
text/plain
Expires
Tue, Oct 1, 6:18 AM (11 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
10521053
Default Alt Text
D46011.diff (910 B)

Event Timeline