summaryrefslogtreecommitdiff
path: root/src/udev/udev-builtin-hwdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev/udev-builtin-hwdb.c')
-rw-r--r--src/udev/udev-builtin-hwdb.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/udev/udev-builtin-hwdb.c b/src/udev/udev-builtin-hwdb.c
index dbfe024298..396384f6c8 100644
--- a/src/udev/udev-builtin-hwdb.c
+++ b/src/udev/udev-builtin-hwdb.c
@@ -1,22 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-/***
- This file is part of systemd.
-
- Copyright 2012 Kay Sievers <kay@vrfy.org>
-
- 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 <fnmatch.h>
#include <getopt.h>
@@ -73,9 +55,9 @@ static const char *modalias_usb(struct udev_device *dev, char *s, size_t size) {
if (!p)
return NULL;
if (safe_atoux16(v, &vn) < 0)
- return NULL;
+ return NULL;
if (safe_atoux16(p, &pn) < 0)
- return NULL;
+ return NULL;
snprintf(s, size, "usb:v%04Xp%04X*", vn, pn);
return s;
}
@@ -139,7 +121,7 @@ static int builtin_hwdb(struct udev_device *dev, int argc, char *argv[], bool te
const char *device = NULL;
const char *subsystem = NULL;
const char *prefix = NULL;
- _cleanup_udev_device_unref_ struct udev_device *srcdev = NULL;
+ _cleanup_(udev_device_unrefp) struct udev_device *srcdev = NULL;
if (!hwdb)
return EXIT_FAILURE;