Put parenthesis around sizeof args.

This commit is contained in:
Kevin Lo 2012-07-17 02:05:39 +00:00
parent 8e68324104
commit d14fdb79fe
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=238542
4 changed files with 6 additions and 6 deletions

View File

@ -63,7 +63,7 @@ main(int argc, char **argv)
{
int dmm;
unsigned char buf[100];
char vbuf[sizeof buf * 4];
char vbuf[sizeof(buf) * 4];
/* DVM */
dmm = ibdev(0, (argc > 1? atoi(argv[1]): 7), 0,
@ -71,7 +71,7 @@ main(int argc, char **argv)
if (dmm < 0)
errx(1, "ibdev = %d\\n", dmm);
ibwrt(dmm, "*IDN?\\r\\n", 7);
ibrd(dmm, buf, sizeof buf - 1);
ibrd(dmm, buf, sizeof(buf) - 1);
strvisx(vbuf, buf, ibcnt, VIS_WHITE | VIS_CSTYLE);
printf("%s\\n", vbuf);
return (0);

View File

@ -185,7 +185,7 @@ iwi_node_alloc(struct ieee80211vap *vap,
{
struct iwi_node *in;
in = malloc(sizeof (struct iwi_node), M_80211_NODE,
in = malloc(sizeof(struct iwi_node), M_80211_NODE,
M_NOWAIT | M_ZERO);
if (in == NULL)
return NULL;

View File

@ -153,12 +153,12 @@ msdosfs_cmount(struct mntarg *ma, void *data, int flags, struct thread *td)
if (data == NULL)
return (EINVAL);
error = copyin(data, &args, sizeof args);
error = copyin(data, &args, sizeof(args));
if (error)
return (error);
ma = mount_argsu(ma, "from", args.fspec, MAXPATHLEN);
ma = mount_arg(ma, "export", &args.export, sizeof args.export);
ma = mount_arg(ma, "export", &args.export, sizeof(args.export));
ma = mount_argf(ma, "uid", "%d", args.uid);
ma = mount_argf(ma, "gid", "%d", args.gid);
ma = mount_argf(ma, "mask", "%d", args.mask);

View File

@ -197,7 +197,7 @@ MALLOC_DEFINE(M_FOOBUF, "foobuffers", "Buffers to foo data into the ether");
/* sys/something/foo_subr.c */
\&...
buf = malloc(sizeof *buf, M_FOOBUF, M_NOWAIT);
buf = malloc(sizeof(*buf), M_FOOBUF, M_NOWAIT);
.Ed
.Pp