From: Guillem Jover <guillem@hadrons.org>
To: Dave Reisner <dreisner@archlinux.org>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH 2/3] logger: use memcpy instead of bcopy
Date: Mon, 28 May 2012 01:23:00 +0200 [thread overview]
Message-ID: <20120527232300.GA15566@gaara.hadrons.org> (raw)
In-Reply-To: <1337805360-16469-2-git-send-email-dreisner@archlinux.org>
On Wed, 2012-05-23 at 16:35:59 -0400, Dave Reisner wrote:
> 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);
The src/dst arguments to memcpy() should get swapped.
thanks,
guillem
next prev parent reply other threads:[~2012-05-27 23:28 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 [this message]
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=20120527232300.GA15566@gaara.hadrons.org \
--to=guillem@hadrons.org \
--cc=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).