mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 15:20:19 +01:00
libnm: ignore phrases in fixup device description only when delimited by space
This commit is contained in:
parent
12c881ad40
commit
72104ea10a
1 changed files with 5 additions and 1 deletions
|
|
@ -1507,7 +1507,11 @@ fixup_desc_string (const char *desc)
|
|||
if (p) {
|
||||
const char *eow = &p[strlen (IGNORED_PHRASES[i])];
|
||||
|
||||
memmove (p, eow, strlen (eow) + 1); /* +1 for the \0 */
|
||||
/* require that the phrase is delimited by space, or
|
||||
* at the beginning or end of the description. */
|
||||
if ( (p == desc_full || p[-1] == ' ')
|
||||
&& NM_IN_SET (eow[0], '\0', ' '))
|
||||
memmove (p, eow, strlen (eow) + 1); /* +1 for the \0 */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue