1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

Reduce diff against my local version: replace malloc+memset() cases to calloc().

This commit is contained in:
Xin LI 2009-05-15 19:41:10 +00:00
parent 0c794c5db1
commit 216fa4c607
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=192153
10 changed files with 12 additions and 22 deletions

View File

@ -191,8 +191,7 @@ amd64_syscall_entry(struct trussinfo *trussinfo, int nargs) {
fsc.nargs = nargs;
}
fsc.s_args = malloc((1+fsc.nargs) * sizeof(char*));
memset(fsc.s_args, 0, fsc.nargs * sizeof(char*));
fsc.s_args = calloc(1, (1+fsc.nargs) * sizeof(char*));
fsc.sc = sc;
/*

View File

@ -194,8 +194,7 @@ amd64_fbsd32_syscall_entry(struct trussinfo *trussinfo, int nargs) {
fsc.nargs = nargs;
}
fsc.s_args = malloc((1+fsc.nargs) * sizeof(char*));
memset(fsc.s_args, 0, fsc.nargs * sizeof(char*));
fsc.s_args = calloc(1, (1+fsc.nargs) * sizeof(char*));
fsc.sc = sc;
/*

View File

@ -164,8 +164,7 @@ amd64_linux32_syscall_entry(struct trussinfo *trussinfo, int nargs) {
fsc.nargs = nargs;
}
fsc.s_args = malloc((1+fsc.nargs) * sizeof(char*));
memset(fsc.s_args, 0, fsc.nargs * sizeof(char*));
fsc.s_args = calloc(1, (1+fsc.nargs) * sizeof(char*));
fsc.sc = sc;
/*

View File

@ -184,8 +184,7 @@ i386_syscall_entry(struct trussinfo *trussinfo, int nargs) {
fsc.nargs = nargs;
}
fsc.s_args = malloc((1+fsc.nargs) * sizeof(char*));
memset(fsc.s_args, 0, fsc.nargs * sizeof(char*));
fsc.s_args = calloc(1, (1+fsc.nargs) * sizeof(char*));
fsc.sc = sc;
/*

View File

@ -164,8 +164,7 @@ i386_linux_syscall_entry(struct trussinfo *trussinfo, int nargs) {
fsc.nargs = nargs;
}
fsc.s_args = malloc((1+fsc.nargs) * sizeof(char*));
memset(fsc.s_args, 0, fsc.nargs * sizeof(char*));
fsc.s_args = calloc(1, (1+fsc.nargs) * sizeof(char*));
fsc.sc = sc;
/*

View File

@ -166,8 +166,7 @@ ia64_syscall_entry(struct trussinfo *trussinfo, int nargs) {
fsc.nargs = nargs;
}
fsc.s_args = malloc((1+fsc.nargs) * sizeof(char*));
memset(fsc.s_args, 0, fsc.nargs * sizeof(char*));
fsc.s_args = calloc(1, (1+fsc.nargs) * sizeof(char*));
fsc.sc = sc;
/*

View File

@ -179,11 +179,10 @@ main(int ac, char **av)
initial_open = 1;
/* Initialize the trussinfo struct */
trussinfo = (struct trussinfo *)malloc(sizeof(struct trussinfo));
trussinfo = (struct trussinfo *)calloc(1, sizeof(struct trussinfo));
if (trussinfo == NULL)
errx(1, "malloc() failed");
bzero(trussinfo, sizeof(struct trussinfo));
errx(1, "calloc() failed");
trussinfo->outfile = stderr;
trussinfo->strsize = 32;
trussinfo->pr_why = S_NONE;

View File

@ -211,8 +211,7 @@ mips_syscall_entry(struct trussinfo *trussinfo, int nargs) {
fsc.nargs = nargs;
}
fsc.s_args = malloc((1+fsc.nargs) * sizeof(char*));
memset(fsc.s_args, 0, fsc.nargs * sizeof(char*));
fsc.s_args = calloc(1, (1+fsc.nargs) * sizeof(char*));
fsc.sc = sc;
/*

View File

@ -193,8 +193,7 @@ powerpc_syscall_entry(struct trussinfo *trussinfo, int nargs) {
fsc.nargs = nargs;
}
fsc.s_args = malloc((1+fsc.nargs) * sizeof(char*));
memset(fsc.s_args, 0, fsc.nargs * sizeof(char*));
fsc.s_args = calloc(1, (1+fsc.nargs) * sizeof(char*));
fsc.sc = sc;
/*

View File

@ -209,8 +209,7 @@ sparc64_syscall_entry(struct trussinfo *trussinfo, int nargs) {
fsc.nargs = nargs;
}
fsc.s_args = malloc((1+fsc.nargs) * sizeof(char*));
memset(fsc.s_args, 0, fsc.nargs * sizeof(char*));
fsc.s_args = calloc(1, (1+fsc.nargs) * sizeof(char*));
fsc.sc = sc;
/*