All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vishwajith.K" <vishuvikas1996@gmail.com>
To: linux-man@vger.kernel.org
Cc: alx.manpages@gmail.com, mtk.manpages@gmail.com
Subject: [patch] shmop.2: tfix
Date: Tue, 4 May 2021 19:22:30 +0530	[thread overview]
Message-ID: <CAN2tbMWSHJ=BXe70ygXg9NpCWhB+3V-CpZEWCTtOynJr_QODbw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 693 bytes --]

From 8f678998296fab3d68b3637f5334d8ded37f3c99 Mon Sep 17 00:00:00 2001
From: Vishwajith K <vishuvikas1996@gmail.com>
Date: Tue, 4 May 2021 10:09:11 -0400
Subject: [PATCH] tfix: shmop.2 example code

---
 man2/shmop.2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/man2/shmop.2 b/man2/shmop.2
index 3a6c908ee..c7e66af0e 100644
--- a/man2/shmop.2
+++ b/man2/shmop.2
@@ -387,8 +387,8 @@ main(int argc, char *argv[])
         errExit("shmget");

     semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600);
-    if (shmid == \-1)
-        errExit("shmget");
+    if (semid == \-1)
+        errExit("semget");

     /* Attach shared memory into our address space. */

-- 
2.27.0

[-- Attachment #2: 0001-tfix-shmop.2-example-code.patch --]
[-- Type: application/octet-stream, Size: 697 bytes --]

From 8f678998296fab3d68b3637f5334d8ded37f3c99 Mon Sep 17 00:00:00 2001
From: Vishwajith K <vishuvikas1996@gmail.com>
Date: Tue, 4 May 2021 10:09:11 -0400
Subject: [PATCH] tfix: shmop.2 example code

---
 man2/shmop.2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/man2/shmop.2 b/man2/shmop.2
index 3a6c908ee..c7e66af0e 100644
--- a/man2/shmop.2
+++ b/man2/shmop.2
@@ -387,8 +387,8 @@ main(int argc, char *argv[])
         errExit("shmget");
 
     semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600);
-    if (shmid == \-1)
-        errExit("shmget");
+    if (semid == \-1)
+        errExit("semget");
 
     /* Attach shared memory into our address space. */
 
-- 
2.27.0


             reply	other threads:[~2021-05-04 13:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04 13:52 Vishwajith.K [this message]
2021-05-08 10:07 ` [patch] shmop.2: tfix Vishwajith.K
2021-05-08 16:13   ` Alejandro Colomar (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAN2tbMWSHJ=BXe70ygXg9NpCWhB+3V-CpZEWCTtOynJr_QODbw@mail.gmail.com' \
    --to=vishuvikas1996@gmail.com \
    --cc=alx.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.