|
|
|
Re: [PATCH 2/3] logger: use memcpy instead of bcopy | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
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@xxxxxxxxxxxxx>
> ---
> 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
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Site Home] [Netdev] [Ethernet Bridging] [Linux Wireless] [Kernel Newbies] [Memory] [Security] [Linux for Hams] [Netfilter] [Bugtraq] [Rubini] [Photo] [Yosemite] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux RAID] [Linux Admin] [Samba] [Video 4 Linux] [Linux Resources]