diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2020-07-02 11:35:14 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2020-07-02 11:52:25 +0200 |
| commit | c6c4e39b012d544c1f1ed816686c8ae1599da793 (patch) | |
| tree | 094d5e07c1d135d0ee67d99e051fd6a9a367a6a4 /src/initrd/nmi-dt-reader.c | |
| parent | 7368e45ff5b3b8b328d55408bcd403e4d6c564d0 (diff) | |
| parent | acd7b014c72673f5b0c0b91309e27028886da167 (diff) | |
Merge remote-tracking branch 'salsa/debian/master' into ubuntu/master
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; } |