Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/net Drop redundant null checks.



details:   https://anonhg.NetBSD.org/src/rev/ba6c12709a40
branches:  trunk
changeset: 822270:ba6c12709a40
user:      maya <maya%NetBSD.org@localhost>
date:      Fri Mar 10 17:47:20 2017 +0000

description:
Drop redundant null checks.

this doesn't increase diff to upstream, the whole block differs already.

diffstat:

 lib/libc/net/hesiod.c |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (31 lines):

diff -r 5e83e6c9ad46 -r ba6c12709a40 lib/libc/net/hesiod.c
--- a/lib/libc/net/hesiod.c     Fri Mar 10 17:15:47 2017 +0000
+++ b/lib/libc/net/hesiod.c     Fri Mar 10 17:47:20 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hesiod.c,v 1.28 2014/09/18 13:58:20 christos Exp $     */
+/*     $NetBSD: hesiod.c,v 1.29 2017/03/10 17:47:20 maya Exp $ */
 
 /* Copyright (c) 1996 by Internet Software Consortium.
  *
@@ -51,7 +51,7 @@
     "#Id: hesiod_p.h,v 1.1 1996/12/08 21:39:37 ghudson Exp #");
 __IDSTRING(rcsid_hescompat_c,
     "#Id: hescompat.c,v 1.1.2.1 1996/12/16 08:37:45 ghudson Exp #");
-__RCSID("$NetBSD: hesiod.c,v 1.28 2014/09/18 13:58:20 christos Exp $");
+__RCSID("$NetBSD: hesiod.c,v 1.29 2017/03/10 17:47:20 maya Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -152,10 +152,8 @@
 
        serrno = errno;
        if (ctx) {
-               if (ctx->lhs)
-                       free(ctx->lhs);
-               if (ctx->rhs)
-                       free(ctx->rhs);
+               free(ctx->lhs);
+               free(ctx->rhs);
                free(ctx);
        }
        errno = serrno;



Home | Main Index | Thread Index | Old Index