mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-02-04 02:30:26 +01:00
Only match uninstalled packages that end in "-uninstalled" with hyphen
pkg-config(1) states that installed packages should be appended with "-uninstalled". However, the code was checking only for trailing "uninstalled" without the hyphen. Make the code consistent with the documentation. Freedesktop #54379
This commit is contained in:
parent
1184d2085a
commit
3aa62167be
1 changed files with 3 additions and 3 deletions
6
pkg.c
6
pkg.c
|
|
@ -106,8 +106,8 @@ ends_in_dotpc (const char *str)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/* strlen ("uninstalled") */
|
||||
#define UNINSTALLED_LEN 11
|
||||
/* strlen ("-uninstalled") */
|
||||
#define UNINSTALLED_LEN 12
|
||||
|
||||
gboolean
|
||||
name_ends_in_uninstalled (const char *str)
|
||||
|
|
@ -115,7 +115,7 @@ name_ends_in_uninstalled (const char *str)
|
|||
int len = strlen (str);
|
||||
|
||||
if (len > UNINSTALLED_LEN &&
|
||||
FOLDCMP ((str + len - UNINSTALLED_LEN), "uninstalled") == 0)
|
||||
FOLDCMP ((str + len - UNINSTALLED_LEN), "-uninstalled") == 0)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue