summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-hwdb/sd-hwdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-hwdb/sd-hwdb.c')
-rw-r--r--src/libsystemd/sd-hwdb/sd-hwdb.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/libsystemd/sd-hwdb/sd-hwdb.c b/src/libsystemd/sd-hwdb/sd-hwdb.c
index 9418e8cf38..5c612d9a2f 100644
--- a/src/libsystemd/sd-hwdb/sd-hwdb.c
+++ b/src/libsystemd/sd-hwdb/sd-hwdb.c
@@ -1,23 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
- Copyright 2012 Kay Sievers <kay@vrfy.org>
- Copyright 2008 Alan Jenkins <alan.christopher.jenkins@googlemail.com>
- Copyright 2014 Tom Gundersen <teg@jklm.no>
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ Copyright © 2008 Alan Jenkins <alan.christopher.jenkins@googlemail.com>
***/
#include <errno.h>
@@ -373,8 +356,7 @@ _public_ int sd_hwdb_new(sd_hwdb **ret) {
log_debug("strings %8"PRIu64" bytes", le64toh(hwdb->head->strings_len));
log_debug("nodes %8"PRIu64" bytes", le64toh(hwdb->head->nodes_len));
- *ret = hwdb;
- hwdb = NULL;
+ *ret = TAKE_PTR(hwdb);
return 0;
}