OSDN Git Service

Update README
[linuxjm/LDP_man-pages.git] / original / man3 / err.3
index 0f4e07d..dad8ad2 100644 (file)
@@ -36,7 +36,7 @@
 .\"
 .\" 2011-09-10, mtk, Converted from mdoc to man macros
 .\"
-.TH ERR 3 2012-03-15 "Linux" "Linux Programmer's Manual"
+.TH ERR 3 2013-12-30 "Linux" "Linux Programmer's Manual"
 .SH NAME
 err, verr, errx, verrx, warn, vwarn, warnx, vwarnx \- formatted error messages
 .SH SYNOPSIS
@@ -122,9 +122,11 @@ information string and exit:
 .in +4n
 .nf
 
-if ((p = malloc(size)) == NULL)
+p = malloc(size);
+if (p == NULL)
     err(1, NULL);
-if ((fd = open(file_name, O_RDONLY, 0)) == \-1)
+fd = open(file_name, O_RDONLY, 0);
+if (fd == \-1)
     err(1, "%s", file_name);
 .fi
 .in
@@ -142,10 +144,12 @@ Warn of an error:
 .in +4n
 .nf
 
-if ((fd = open(raw_device, O_RDONLY, 0)) == \-1)
+fd = open(raw_device, O_RDONLY, 0);
+if (fd == \-1)
     warnx("%s: %s: trying the block device",
             raw_device, strerror(errno));
-if ((fd = open(block_device, O_RDONLY, 0)) == \-1)
+fd = open(block_device, O_RDONLY, 0);
+if (fd == \-1)
     err(1, "%s", block_device);
 .fi
 .in
@@ -155,3 +159,12 @@ if ((fd = open(block_device, O_RDONLY, 0)) == \-1)
 .BR perror (3),
 .BR printf (3),
 .BR strerror (3)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.