]> git.michaelhowe.org Git - packages/o/openafs.git/commit
rx: remove trailing semicolons from FBSD mutex operations
authorBenjamin Kaduk <kaduk@mit.edu>
Fri, 5 Jan 2018 04:00:15 +0000 (22:00 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 9 Feb 2018 15:40:14 +0000 (10:40 -0500)
commit5bb7684f07b5f346b68230c2f38edad4c46dc648
treefc576e3c313ef61660ef7bddb867a5c98bae8844
parent2f07951a47a8a820c89e4e6ab1e347858acd8ab5
rx: remove trailing semicolons from FBSD mutex operations

Since the first introduction of FreeBSD support, the macros
(MUTEX_ENTER, etc.) for kernel mutex operations have included
trailing semicolons, unique among all the platforms.

This did not cause problems until the recent work on rx event
handlers, which put a MUTEX_ENTER() in the body of an 'if' clause
with no brackets, and attempted to follow it with an 'else' clause.
This results in the following (rather obtuse) compiler error:

   /root/openafs/src/rx/rx.c:3666:5: error: expected expression
       else
       ^

Which is more visible in the preprocessed source, as

   if (condition)
       expression;;
   else
       other_expression;

is clearly invalid C.

To fix the FreeBSD kernel module build, remove the unneeded semicolons.

Reviewed-on: https://gerrit.openafs.org/12853
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 0760feb7992e1e39f716c5f583fe7f6e85584262)

Change-Id: I503a5967a167e9be92721af8dc82d191f3bf18ba
Reviewed-on: https://gerrit.openafs.org/12899
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/rx/FBSD/rx_kmutex.h