diff options
| author | Michael Biebl <biebl@debian.org> | 2020-06-28 18:58:14 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-06-28 18:58:14 +0200 |
| commit | a54ac63bbf9b2c71026ac9028a8ffaf186cf3c82 (patch) | |
| tree | 6a32883bd916c4096357b35298beff6db8bcd0b5 /src/initrd/nmi-dt-reader.c | |
| parent | 45e8e1149027529194982212c804c0468aa01d98 (diff) | |
New upstream version 1.25.90 upstream/1.25.90
Diffstat (limited to 'src/initrd/nmi-dt-reader.c')
| -rw-r--r-- | src/initrd/nmi-dt-reader.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/initrd/nmi-dt-reader.c b/src/initrd/nmi-dt-reader.c index f118adc3..205cc0b5 100644 --- a/src/initrd/nmi-dt-reader.c +++ b/src/initrd/nmi-dt-reader.c @@ -156,7 +156,7 @@ nmi_dt_reader_parse (const char *sysfs_dir) local_hwaddr = dt_get_hwaddr_property (base, bootpath, "local-mac-address"); hwaddr = dt_get_hwaddr_property (base, bootpath, "mac-address"); - if (g_strcmp0 (local_hwaddr, hwaddr) == 0) + if (nm_streq0 (local_hwaddr, hwaddr)) nm_clear_g_free (&local_hwaddr); tokens = g_strsplit (path, ",", 0); @@ -169,10 +169,10 @@ nmi_dt_reader_parse (const char *sysfs_dir) for (i = 0; tokens[i]; i++) { /* Skip these. They have magical meaning for OpenFirmware. */ - if ( strcmp (tokens[i], "nfs") == 0 - || strcmp (tokens[i], "last") == 0) + if (NM_IN_STRSET (tokens[i], "nfs", + "last")) continue; - if (strcmp (tokens[i], "promiscuous") == 0) { + if (nm_streq (tokens[i], "promiscuous")) { /* Ignore. */ continue; } @@ -201,9 +201,9 @@ nmi_dt_reader_parse (const char *sysfs_dir) */ for (; tokens[i]; i++) { - if ( strcmp (tokens[i], "bootp") == 0 - || strcmp (tokens[i], "dhcp") == 0 - || strcmp (tokens[i], "rarp") == 0) { + if (NM_IN_STRSET (tokens[i], "bootp", + "dhcp", + "rarp")) { bootp = TRUE; continue; } |