Put parenthesis around sizeof args.
This commit is contained in:
parent
8e68324104
commit
d14fdb79fe
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=238542
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user