mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-09-09 17:45:00 +03:00
sd-device: don't compare pointers with numeric zero
Our coding style says no to this.
This commit is contained in:
@@ -355,7 +355,12 @@ static int device_amend(sd_device *device, const char *key, const char *value) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int device_append(sd_device *device, char *key, const char **_major, const char **_minor) {
|
||||
static int device_append(
|
||||
sd_device *device,
|
||||
char *key,
|
||||
const char **_major,
|
||||
const char **_minor) {
|
||||
|
||||
const char *major = NULL, *minor = NULL;
|
||||
char *value;
|
||||
int r;
|
||||
@@ -384,10 +389,10 @@ static int device_append(sd_device *device, char *key, const char **_major, cons
|
||||
return r;
|
||||
}
|
||||
|
||||
if (major != 0)
|
||||
if (major)
|
||||
*_major = major;
|
||||
|
||||
if (minor != 0)
|
||||
if (minor)
|
||||
*_minor = minor;
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user