-/* $OpenBSD: installboot.c,v 1.18 2014/07/12 18:44:40 tedu Exp $ */
+/* $OpenBSD: installboot.c,v 1.19 2014/07/12 19:01:49 tedu Exp $ */
/* $NetBSD: installboot.c,v 1.2 1997/04/06 08:41:12 cgd Exp $ */
/*
}
if (read(fd, bp, statbuf.st_size) != statbuf.st_size) {
warn("read: %s", fname);
- free(bp, 0);
+ free(bp);
close(fd);
return NULL;
}
-/* $OpenBSD: setnetbootinfo.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
+/* $OpenBSD: setnetbootinfo.c,v 1.4 2014/07/12 19:01:49 tedu Exp $ */
/* $NetBSD: setnetbootinfo.c,v 1.5 1997/04/06 08:41:37 cgd Exp $ */
/*
printf("closing %s...\n", outfilename);
close(fd);
- free(netbb, 0);
+ free(netbb);
if (outfile == NULL)
- free(outfilename, 0);
+ free(outfilename);
exit (0);
}
-/* $OpenBSD: a2coff.c,v 1.12 2014/07/12 18:44:41 tedu Exp $ */
+/* $OpenBSD: a2coff.c,v 1.13 2014/07/12 19:01:49 tedu Exp $ */
/*
* Copyright (c) 2006, 2013, Miodrag Vallat
*
last = n;
}
- free(phdr, 0);
+ free(phdr);
/*
* Fill ``data'' section.
-/* $OpenBSD: oaic.c,v 1.2 2014/07/12 18:44:41 tedu Exp $ */
+/* $OpenBSD: oaic.c,v 1.3 2014/07/12 19:01:49 tedu Exp $ */
/*
* Copyright (c) 2010, 2013 Miodrag Vallat.
void
oaic_detach(void *cookie)
{
- free(cookie, sizeof(struct aic6250_softc), 0);
+ free(cookie, sizeof(struct aic6250_softc));
}
/*
-/* $OpenBSD: oosiop.c,v 1.5 2014/07/12 18:44:41 tedu Exp $ */
+/* $OpenBSD: oosiop.c,v 1.6 2014/07/12 19:01:49 tedu Exp $ */
/* OpenBSD: oosiop.c,v 1.20 2013/10/09 18:22:06 miod Exp */
/* OpenBSD: oosiopvar.h,v 1.5 2011/04/03 12:42:36 krw Exp */
/* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */
{
struct oosiop_softc *sc = cookie;
- free(sc->sc_scr, sizeof(oosiop_script), 0);
- free(sc, sizeof *sc, 0);
+ free(sc->sc_scr, sizeof(oosiop_script));
+ free(sc, sizeof *sc);
}
static __inline void
-/* $OpenBSD: scsi.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
+/* $OpenBSD: scsi.c,v 1.4 2014/07/12 19:01:49 tedu Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
done:
if (priv->scsicookie == NULL) {
- free(priv, sizeof(struct scsi_private), 0);
+ free(priv, sizeof(struct scsi_private));
priv = NULL;
}
-/* $OpenBSD: sd.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
+/* $OpenBSD: sd.c,v 1.7 2014/07/12 19:01:49 tedu Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
priv = (struct scsi_private *)f->f_devdata;
if (priv->scsicookie != NULL)
(*priv->scsidetach)(priv->scsicookie);
- free(priv, sizeof(struct scsi_private), 0);
+ free(priv, sizeof(struct scsi_private));
f->f_devdata = NULL;
}
-/* $OpenBSD: vdmtool.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
+/* $OpenBSD: vdmtool.c,v 1.4 2014/07/12 19:01:49 tedu Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
curbuf = append_vdit_portion(fd, secno, curbuf, sector,
first ? VDIT_BLOCK_HEAD_BE : VDIT_PORTION_HEADER_BLOCK);
if (curbuf == NULL) {
- free(buf, 0);
+ free(buf);
return NULL;
}
first = 0;
}
if (memcmp(vdit, vdit2, vditsize) != 0)
printf("VDIT and backup VDIT differ!\n");
- free(vdit2, 0);
+ free(vdit2);
}
- free(vdit, 0);
+ free(vdit);
}
}
-/* $OpenBSD: sgivol.c,v 1.22 2014/07/12 18:44:42 tedu Exp $ */
+/* $OpenBSD: sgivol.c,v 1.23 2014/07/12 19:01:49 tedu Exp $ */
/* $NetBSD: sgivol.c,v 1.8 2003/11/08 04:59:00 sekiya Exp $ */
/*-
i -= fsize;
}
fclose(fp);
- free(fbuf, 0);
+ free(fbuf);
}
void
-/* $OpenBSD: installboot.c,v 1.9 2014/07/12 18:44:43 tedu Exp $ */
+/* $OpenBSD: installboot.c,v 1.10 2014/07/12 19:01:49 tedu Exp $ */
/* $NetBSD: installboot.c,v 1.1 1997/06/01 03:39:45 mrg Exp $ */
/*
}
if (read(fd, bp, statbuf.st_size) != statbuf.st_size) {
warn("read: %s", fname);
- free(bp, 0);
+ free(bp);
close(fd);
return NULL;
}
if ((int)block_table & 3) {
warn("%s: invalid address: block_table = %x",
fname, block_table);
- free(bp, 0);
+ free(bp);
close(fd);
return NULL;
}
if ((int)block_count_p & 3) {
warn("%s: invalid address: block_count_p = %x",
fname, block_count_p);
- free(bp, 0);
+ free(bp);
close(fd);
return NULL;
}
if ((int)block_size_p & 3) {
warn("%s: invalid address: block_size_p = %x",
fname, block_size_p);
- free(bp, 0);
+ free(bp);
close(fd);
return NULL;
}
-/* $OpenBSD: nlist.c,v 1.2 2014/07/12 18:44:43 tedu Exp $ */
+/* $OpenBSD: nlist.c,v 1.3 2014/07/12 19:01:49 tedu Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
}
aout_done:
if (usemalloc)
- free(strtab, 0);
+ free(strtab);
else
munmap(strtab, strsize);
return (nent);
-/* $OpenBSD: aicasm_symbol.c,v 1.12 2014/07/12 18:48:18 tedu Exp $ */
+/* $OpenBSD: aicasm_symbol.c,v 1.13 2014/07/12 19:01:49 tedu Exp $ */
/* $NetBSD: aicasm_symbol.c,v 1.4 2003/07/14 15:42:40 lukem Exp $ */
/*
case SRAMLOC:
case REGISTER:
if (symbol->info.rinfo != NULL)
- free(symbol->info.rinfo, 0);
+ free(symbol->info.rinfo);
break;
case ALIAS:
if (symbol->info.ainfo != NULL)
- free(symbol->info.ainfo, 0);
+ free(symbol->info.ainfo);
break;
case MASK:
case FIELD:
case ENUM_ENTRY:
if (symbol->info.finfo != NULL) {
symlist_free(&symbol->info.finfo->symrefs);
- free(symbol->info.finfo, 0);
+ free(symbol->info.finfo);
}
break;
case DOWNLOAD_CONST:
case CONST:
if (symbol->info.cinfo != NULL)
- free(symbol->info.cinfo, 0);
+ free(symbol->info.cinfo);
break;
case LABEL:
if (symbol->info.linfo != NULL)
- free(symbol->info.linfo, 0);
+ free(symbol->info.linfo);
break;
case UNINITIALIZED:
default:
break;
}
- free(symbol->name, 0);
- free(symbol, 0);
+ free(symbol->name);
+ free(symbol);
}
void
node1 = SLIST_FIRST(symlist);
while (node1 != NULL) {
node2 = SLIST_NEXT(node1, links);
- free(node1, 0);
+ free(node1);
node1 = node2;
}
SLIST_INIT(symlist);
fprintf(ofile, "#define%s%-16s%s0x%02x\n",
tab_str, curnode->symbol->name, tab_str2,
value);
- free(curnode, 0);
+ free(curnode);
}
fprintf(ofile, "\n\n");
fprintf(ofile, "#define\t%-8s\t0x%02x\n",
curnode->symbol->name,
curnode->symbol->info.cinfo->value);
- free(curnode, 0);
+ free(curnode);
}
fprintf(ofile, "#define\t%-8s\t0x%02x\n",
curnode->symbol->name,
curnode->symbol->info.cinfo->value);
- free(curnode, 0);
+ free(curnode);
}
fprintf(ofile, "#define\tDOWNLOAD_CONST_COUNT\t0x%02x\n", i);
fprintf(ofile, "#define\tLABEL_%-8s\t0x%02x\n",
curnode->symbol->name,
curnode->symbol->info.linfo->address);
- free(curnode, 0);
+ free(curnode);
}
}
-/* $OpenBSD: build.c,v 1.6 2014/07/12 18:48:18 tedu Exp $ */
+/* $OpenBSD: build.c,v 1.7 2014/07/12 19:01:49 tedu Exp $ */
/*
* Copyright (c) 2004 Theo de Raadt <deraadt@openbsd.org>
write_firmware(FILENAME_B09, bf, sizeof(*bf), chunks_b09,
nitems(chunks_b09));
- free(bf, 0);
+ free(bf);
rh = (struct bnx_rv2p_header *)malloc(sizeof *rh);
write_firmware(FILENAME_XI90_RV2P, rh, sizeof(*rh), chunks_xi90_rv2p,
nitems(chunks_xi90_rv2p));
- free(rh, 0);
+ free(rh);
return 0;
}
-/* $OpenBSD: build.c,v 1.2 2014/07/12 18:48:18 tedu Exp $ */
+/* $OpenBSD: build.c,v 1.3 2014/07/12 19:01:49 tedu Exp $ */
/*
* Copyright (c) 2006 Marcus Glocker <mglocker@openbsd.org>
err(1, "malloc");
}
if (read(fdin, p, h[i].filesize) < 1) {
- free(p, 0);
+ free(p);
close(fdout);
close(fdin);
err(1, "read input file failed\n");
}
if (write(fdout, p, h[i].filesize) < 1) {
- free(p, 0);
+ free(p);
close(fdout);
close(fdin);
err(1, "write to output file failed\n");
}
- free(p, 0);
+ free(p);
close(fdin);
}
-/* $OpenBSD: extract.c,v 1.2 2014/07/12 18:48:18 tedu Exp $ */
+/* $OpenBSD: extract.c,v 1.3 2014/07/12 19:01:49 tedu Exp $ */
/*
* Copyright (c) 2006 Marcus Glocker <mglocker@openbsd.org>
err(1, "read from input file failed");
if (write(fdout, p, h[i]->filesize) < 1)
err(1, "write to output file failed");
- free(p, 0);
+ free(p);
close(fdout);
printf("extracting %s (filesize %d, fileoffset %d)\n",
h[i]->filename, h[i]->filesize, h[i]->fileoffset);
/* free header space */
for (i = 0; i < nfiles; i++)
- free(h[i], 0);
- free(h, 0);
+ free(h[i]);
+ free(h);
/* game over */
close (fdin);
-/* $OpenBSD: build.c,v 1.5 2014/07/12 18:48:18 tedu Exp $ */
+/* $OpenBSD: build.c,v 1.6 2014/07/12 19:01:49 tedu Exp $ */
/*
* Copyright (c) 2004 Theo de Raadt <deraadt@openbsd.org>
err(1, "%s", FILENAME);
if (rlen != len)
errx(1, "%s: short write", FILENAME);
- free(kf, 0);
+ free(kf);
close(fd);
return 0;
}
-/* $OpenBSD: build.c,v 1.3 2014/07/12 18:48:18 tedu Exp $ */
+/* $OpenBSD: build.c,v 1.4 2014/07/12 19:01:49 tedu Exp $ */
/*
* Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org>
} while (total < ulen);
printf("%s: len %zu -> %zu\n", file, len, ulen);
- free(ufw, 0);
+ free(ufw);
fclose(f);
}
-/* $OpenBSD: build.c,v 1.7 2014/07/12 18:48:18 tedu Exp $ */
+/* $OpenBSD: build.c,v 1.8 2014/07/12 19:01:50 tedu Exp $ */
/*
* Copyright (c) 2004 Theo de Raadt <deraadt@openbsd.org>
err(1, "%s", name);
if (rlen != len)
errx(1, "%s: short write", name);
- free(tf, 0);
+ free(tf);
close(fd);
}
-/* $OpenBSD: build.c,v 1.5 2014/07/12 18:48:18 tedu Exp $ */
+/* $OpenBSD: build.c,v 1.6 2014/07/12 19:01:50 tedu Exp $ */
/*
* Copyright (c) 2004 Theo de Raadt <deraadt@openbsd.org>
err(1, "%s", FILENAME);
if (rlen != len)
errx(1, "%s: short write", FILENAME);
- free(yf, 0);
+ free(yf);
close(fd);
return 0;
}