summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-08-03 08:29:35 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-08-03 08:29:38 +0200
commit21ea2ad83046f154cca68a48aaa063911d5641e4 (patch)
tree6558ad9b0b789d16a4b233e364c4f63b7d3a7080
parent3af8c180cb5f8bbc1de0010b81871e735e0afa60 (diff)
downloadbarebox-21ea2ad83046f154cca68a48aaa063911d5641e4.tar.gz
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>
-rw-r--r--lib/glob.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/glob.c b/lib/glob.c
index c4c6067..1b0137b 100644
--- a/lib/glob.c
+++ b/lib/glob.c
@@ -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;