All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Reisner <dreisner@archlinux.org>
To: util-linux@vger.kernel.org
Cc: Dave Reisner <dreisner@archlinux.org>
Subject: [PATCH 2/3] logger: use memcpy instead of bcopy
Date: Wed, 23 May 2012 16:35:59 -0400	[thread overview]
Message-ID: <1337805360-16469-2-git-send-email-dreisner@archlinux.org> (raw)
In-Reply-To: <1337805360-16469-1-git-send-email-dreisner@archlinux.org>

bcopy is marked legacy in POSIX.1-2001 and should not be used.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
---
 misc-utils/logger.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/misc-utils/logger.c b/misc-utils/logger.c
index 19b4c47..a187227 100644
--- a/misc-utils/logger.c
+++ b/misc-utils/logger.c
@@ -96,7 +96,7 @@ udpopenlog(const char *servername, uint16_t port) {
 	if ((fd = socket(AF_INET, SOCK_DGRAM , 0)) == -1)
 		err(EXIT_FAILURE, _("socket"));
 
-	bcopy(serverhost->h_addr,&s_addr.sin_addr,serverhost->h_length);
+	memcpy(serverhost->h_addr,&s_addr.sin_addr,serverhost->h_length);
         s_addr.sin_family=AF_INET;
         s_addr.sin_port=htons(port);
 
-- 
1.7.10.2


  reply	other threads:[~2012-05-23 20:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-23 20:35 [PATCH 1/3] logger: avoid explicit fclose(stdout) Dave Reisner
2012-05-23 20:35 ` Dave Reisner [this message]
2012-05-23 22:43   ` [PATCH 2/3] logger: use memcpy instead of bcopy Mike Frysinger
2012-05-27 23:23   ` Guillem Jover
2012-05-28 18:02     ` [PATCH] " Dave Reisner
2012-05-29  7:59       ` Karel Zak
2012-05-23 20:36 ` [PATCH 3/3] logger: mark decode/pencode as static Dave Reisner
2012-05-29  7:59   ` Karel Zak
2012-05-29  7:58 ` [PATCH 1/3] logger: avoid explicit fclose(stdout) Karel Zak

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=1337805360-16469-2-git-send-email-dreisner@archlinux.org \
    --to=dreisner@archlinux.org \
    --cc=util-linux@vger.kernel.org \
    /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.