diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2020-07-02 12:20:27 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2020-07-02 12:20:27 +0200 |
| commit | 486e0bef719d78ee55d2166b0bfb4fa684c09854 (patch) | |
| tree | aead4c1cc30eb61a2d9dec70f7c8339904506fad /src/initrd/nmi-dt-reader.c | |
| parent | 39143df7aed46e83f8c68ea9ad6d24cfdf5a1dd8 (diff) | |
| parent | 10ae7d8cd706062742d0cdb1803d49909aef9e06 (diff) | |
Merge branch 'upstream/latest' of https://salsa.debian.org/utopia-team/network-manager into upstream/latest
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; } |