9
0
Fork 0

glob: fix GLOB_SORT

The arguments to collated_compare are actually pointers to
pointers to char, not pointers to char.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2012-08-03 08:29:35 +02:00
parent 3af8c180cb
commit 21ea2ad830
1 changed files with 2 additions and 2 deletions

View File

@ -78,8 +78,8 @@ int glob_pattern_p(const char *pattern, int quote)
/* Do a collated comparison of A and B. */
static int collated_compare(const void *a, const void *b)
{
const char *s1 = a;
const char *s2 = b;
const char *const s1 = *(const char *const *)a;
const char *const s2 = *(const char *const *)b;
if (s1 == s2)
return 0;