summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2012-04-11 21:09:24 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2012-04-11 21:09:24 +0000
commit388e8f3a022ae18dabffacda1afcf74c33a8a96f (patch)
tree0d381aa5b80f93cfb5327d001ee385c5d1d6e0ad
parent86f689f13b547975453eb211e35c45c2c7249c23 (diff)
Recommend using "unsigned int" instead of just "unsigned".
ok deraadt@, tweaks from jmc@ and todd@
-rw-r--r--share/man/man9/style.910
1 files changed, 8 insertions, 2 deletions
diff --git a/share/man/man9/style.9 b/share/man/man9/style.9
index 97a3aa357a5..b0fd5628fa2 100644
--- a/share/man/man9/style.9
+++ b/share/man/man9/style.9
@@ -22,9 +22,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: style.9,v 1.52 2012/04/08 17:36:21 jmc Exp $
+.\" $OpenBSD: style.9,v 1.53 2012/04/11 21:09:23 ratchov Exp $
.\"
-.Dd $Mdocdate: April 8 2012 $
+.Dd $Mdocdate: April 11 2012 $
.Dt STYLE 9
.Os
.Sh NAME
@@ -187,6 +187,12 @@ Enumeration values are all uppercase.
enum enumtype { ONE, TWO } et;
.Ed
.Pp
+When defining unsigned integers use
+.Dq "unsigned int"
+rather than just
+.Dq "unsigned" ;
+the latter has been a source of confusion in the past.
+.Pp
When declaring variables in structures, declare them sorted by use, then
by size (largest to smallest), then by alphabetical order.
The first category normally doesn't apply, but there are exceptions.