diff options
author | 2015-12-05 19:10:19 +0000 | |
---|---|---|
committer | 2015-12-05 19:10:19 +0000 | |
commit | 3589563c27511eb2abfe0fd709678dec29f83074 (patch) | |
tree | 112771d0d4371d3c9b352f828c8525f214d7d0d8 | |
parent | avoid an ugly wrap in a comment (diff) | |
download | wireguard-openbsd-3589563c27511eb2abfe0fd709678dec29f83074.tar.xz wireguard-openbsd-3589563c27511eb2abfe0fd709678dec29f83074.zip |
strings.h -> string.h to prevent an implicit declaration. Also removes
two NULL-checks before free().
-rw-r--r-- | usr.sbin/ypldap/aldap.c | 7 | ||||
-rw-r--r-- | usr.sbin/ypldap/ber.c | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/usr.sbin/ypldap/aldap.c b/usr.sbin/ypldap/aldap.c index 3d96ae7a36e..267988de203 100644 --- a/usr.sbin/ypldap/aldap.c +++ b/usr.sbin/ypldap/aldap.c @@ -1,5 +1,5 @@ -/* $Id: aldap.c,v 1.30 2012/04/30 21:40:03 jmatthew Exp $ */ -/* $OpenBSD: aldap.c,v 1.30 2012/04/30 21:40:03 jmatthew Exp $ */ +/* $Id: aldap.c,v 1.31 2015/12/05 19:10:19 mmcc Exp $ */ +/* $OpenBSD: aldap.c,v 1.31 2015/12/05 19:10:19 mmcc Exp $ */ /* * Copyright (c) 2008 Alexander Schrijver <aschrijver@openbsd.org> @@ -352,8 +352,7 @@ aldap_parse_page_control(struct ber_element *control, size_t len) void aldap_freepage(struct aldap_page_control *page) { - if (page->cookie) - free(page->cookie); + free(page->cookie); free(page); } diff --git a/usr.sbin/ypldap/ber.c b/usr.sbin/ypldap/ber.c index e40886b0b04..2edc2bffbaf 100644 --- a/usr.sbin/ypldap/ber.c +++ b/usr.sbin/ypldap/ber.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ber.c,v 1.9 2015/02/12 00:30:38 pelikan Exp $ */ +/* $OpenBSD: ber.c,v 1.10 2015/12/05 19:10:19 mmcc Exp $ */ /* * Copyright (c) 2007 Reyk Floeter <reyk@vantronix.net> @@ -25,7 +25,7 @@ #include <stdlib.h> #include <err.h> /* XXX for debug output */ #include <stdio.h> /* XXX for debug output */ -#include <strings.h> +#include <string.h> #include <unistd.h> #include <stdarg.h> @@ -1217,8 +1217,7 @@ ber_set_application(struct ber *b, unsigned long (*cb)(struct ber_element *)) void ber_free(struct ber *b) { - if (b->br_wbuf != NULL) - free (b->br_wbuf); + free(b->br_wbuf); } static ssize_t |