Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/syslogd Simplify.



details:   https://anonhg.NetBSD.org/src/rev/1b048746b771
branches:  trunk
changeset: 770184:1b048746b771
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Oct 07 10:50:01 2011 +0000

description:
Simplify.

diffstat:

 usr.sbin/syslogd/tls.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 9ace1853980b -r 1b048746b771 usr.sbin/syslogd/tls.c
--- a/usr.sbin/syslogd/tls.c    Fri Oct 07 10:46:29 2011 +0000
+++ b/usr.sbin/syslogd/tls.c    Fri Oct 07 10:50:01 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tls.c,v 1.7 2011/08/01 12:28:53 mbalmer Exp $  */
+/*     $NetBSD: tls.c,v 1.8 2011/10/07 10:50:01 joerg Exp $    */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: tls.c,v 1.7 2011/08/01 12:28:53 mbalmer Exp $");
+__RCSID("$NetBSD: tls.c,v 1.8 2011/10/07 10:50:01 joerg Exp $");
 
 #ifndef DISABLE_TLS
 #include "syslogd.h"
@@ -1368,8 +1368,9 @@
                peername = NULL;
        }
        else {
-               MALLOC(peername, strlen(hbuf)+1);
-               (void)strlcpy(peername, hbuf, strlen(hbuf)+1);
+               size_t len = strlen(hbuf) + 1;
+               MALLOC(peername, len);
+               (void)memcpy(peername, hbuf, len);
        }
 
 #ifdef LIBWRAP



Home | Main Index | Thread Index | Old Index