[Midnightbsd-cvs] src [11822] trunk/share/examples/mdoc/example.9: fix example

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu Jul 12 20:00:10 EDT 2018


Revision: 11822
          http://svnweb.midnightbsd.org/src/?rev=11822
Author:   laffer1
Date:     2018-07-12 20:00:09 -0400 (Thu, 12 Jul 2018)
Log Message:
-----------
fix example

Modified Paths:
--------------
    trunk/share/examples/mdoc/example.9

Property Changed:
----------------
    trunk/share/examples/mdoc/example.9

Modified: trunk/share/examples/mdoc/example.9
===================================================================
--- trunk/share/examples/mdoc/example.9	2018-07-12 23:58:42 UTC (rev 11821)
+++ trunk/share/examples/mdoc/example.9	2018-07-13 00:00:09 UTC (rev 11822)
@@ -22,11 +22,12 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
+.\" $FreeBSD: stable/10/share/examples/mdoc/example.9 307403 2016-10-16 22:02:50Z sevan $
 .\" $MidnightBSD$
 .\"
 .\" Note: The date here should be updated whenever a non-trivial
 .\" change is made to the manual page.
-.Dd January 12, 2005
+.Dd September 27, 2006
 .Dt EXAMPLE 9
 .Os
 .Sh NAME
@@ -96,14 +97,14 @@
 section is returned, to indicate the error.
 .Sh EXAMPLES
 .Bd -literal
-	int val;
+	int error;
 
-	mutex_lock(&example_lock);
-	if ((val = example(NULL, EXAMPLE_ONE)) != 0) {
-		mutex_unlock(&example_lock);
-		return (val);
+	mtx_lock(&example_lock);
+	if ((error = example(NULL, EXAMPLE_ONE)) != 0) {
+		mtx_unlock(&example_lock);
+		return (error);
 	}
-	mutex_unlock(&example_lock);
+	mtx_unlock(&example_lock);
 .Ed
 .Sh COMPATIBILITY
 The
@@ -298,7 +299,8 @@
 .Xr example 1 ,
 .Xr example 3 ,
 .Xr example 4 ,
-.Xr mdoc 7
+.Xr mdoc 7 ,
+.Xr mutex 9
 .Rs
 .%A "A. B. Author"
 .%T "Example RFC Title"
@@ -337,6 +339,6 @@
 .Sh AUTHORS
 This
 manual page was written by
-.An Giorgos Keramidas Aq keramida at FreeBSD.org .
+.An Giorgos Keramidas Aq Mt keramida at FreeBSD.org .
 .Sh BUGS
 The actual code for this function is vaporware.


Property changes on: trunk/share/examples/mdoc/example.9
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list