summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-device/device-enumerator.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-device/device-enumerator.c')
-rw-r--r--src/libsystemd/sd-device/device-enumerator.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/libsystemd/sd-device/device-enumerator.c b/src/libsystemd/sd-device/device-enumerator.c
index cd9ec042bf..ee71fa8810 100644
--- a/src/libsystemd/sd-device/device-enumerator.c
+++ b/src/libsystemd/sd-device/device-enumerator.c
@@ -1,23 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-/***
- This file is part of systemd.
-
- Copyright 2008-2012 Kay Sievers <kay@vrfy.org>
- Copyright 2014-2015 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/>.
-***/
#include "sd-device.h"
@@ -71,8 +52,7 @@ _public_ int sd_device_enumerator_new(sd_device_enumerator **ret) {
enumerator->n_ref = 1;
enumerator->type = _DEVICE_ENUMERATION_TYPE_INVALID;
- *ret = enumerator;
- enumerator = NULL;
+ *ret = TAKE_PTR(enumerator);
return 0;
}