From: Dave Reisner <dreisner@archlinux.org>
To: util-linux@vger.kernel.org
Cc: Dave Reisner <dreisner@archlinux.org>
Subject: [PATCH] logger: use memcpy instead of bcopy
Date: Mon, 28 May 2012 14:02:59 -0400 [thread overview]
Message-ID: <1338228179-14512-1-git-send-email-dreisner@archlinux.org> (raw)
In-Reply-To: <20120527232300.GA15566@gaara.hadrons.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..0a935f6 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(&s_addr.sin_addr, serverhost->h_addr, serverhost->h_length);
s_addr.sin_family=AF_INET;
s_addr.sin_port=htons(port);
--
1.7.10.2
next prev parent reply other threads:[~2012-05-28 18:03 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 ` [PATCH 2/3] logger: use memcpy instead of bcopy Dave Reisner
2012-05-23 22:43 ` Mike Frysinger
2012-05-27 23:23 ` Guillem Jover
2012-05-28 18:02 ` Dave Reisner [this message]
2012-05-29 7:59 ` [PATCH] " 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=1338228179-14512-1-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).