Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jul 2012 02:05:39 +0000 (UTC)
From:      Kevin Lo <kevlo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r238542 - in head/share/man: man4 man9
Message-ID:  <201207170205.q6H25deA004998@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevlo
Date: Tue Jul 17 02:05:39 2012
New Revision: 238542
URL: http://svn.freebsd.org/changeset/base/238542

Log:
  Put parenthesis around sizeof args.

Modified:
  head/share/man/man4/gpib.4
  head/share/man/man9/ieee80211_node.9
  head/share/man/man9/kernel_mount.9
  head/share/man/man9/malloc.9

Modified: head/share/man/man4/gpib.4
==============================================================================
--- head/share/man/man4/gpib.4	Tue Jul 17 02:02:40 2012	(r238541)
+++ head/share/man/man4/gpib.4	Tue Jul 17 02:05:39 2012	(r238542)
@@ -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);

Modified: head/share/man/man9/ieee80211_node.9
==============================================================================
--- head/share/man/man9/ieee80211_node.9	Tue Jul 17 02:02:40 2012	(r238541)
+++ head/share/man/man9/ieee80211_node.9	Tue Jul 17 02:05:39 2012	(r238542)
@@ -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;

Modified: head/share/man/man9/kernel_mount.9
==============================================================================
--- head/share/man/man9/kernel_mount.9	Tue Jul 17 02:02:40 2012	(r238541)
+++ head/share/man/man9/kernel_mount.9	Tue Jul 17 02:05:39 2012	(r238542)
@@ -153,12 +153,12 @@ msdosfs_cmount(struct mntarg *ma, void *
 
 	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);

Modified: head/share/man/man9/malloc.9
==============================================================================
--- head/share/man/man9/malloc.9	Tue Jul 17 02:02:40 2012	(r238541)
+++ head/share/man/man9/malloc.9	Tue Jul 17 02:05:39 2012	(r238542)
@@ -197,7 +197,7 @@ MALLOC_DEFINE(M_FOOBUF, "foobuffers", "B
 /* sys/something/foo_subr.c */
 
 \&...
-buf = malloc(sizeof *buf, M_FOOBUF, M_NOWAIT);
+buf = malloc(sizeof(*buf), M_FOOBUF, M_NOWAIT);
 
 .Ed
 .Pp



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207170205.q6H25deA004998>