ht2crack2: replace GLIB qsort_r by portable qsort
This commit is contained in:
1 parent
d6f1b3a064
commit
92b78178ec
1 file changed
+2
-3
@@ -354,7 +354,7 @@ static void makedirs(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int datacmp(const void *p1, const void *p2, void *dummy) {
|
static int datacmp(const void *p1, const void *p2) {
|
||||||
unsigned char *d_1 = (unsigned char *)p1;
|
unsigned char *d_1 = (unsigned char *)p1;
|
||||||
unsigned char *d_2 = (unsigned char *)p2;
|
unsigned char *d_2 = (unsigned char *)p2;
|
||||||
|
|
||||||
@@ -420,8 +420,7 @@ static void *sorttable(void *dd) {
|
|||||||
close(fdin);
|
close(fdin);
|
||||||
|
|
||||||
// sort it
|
// sort it
|
||||||
void *dummy = NULL; // clang
|
qsort(table, numentries, DATASIZE, datacmp);
|
||||||
qsort_r(table, numentries, DATASIZE, datacmp, dummy);
|
|
||||||
|
|
||||||
// write to file
|
// write to file
|
||||||
snprintf(outfile, sizeof(outfile), "sorted/%02x/%02x.bin", i, j);
|
snprintf(outfile, sizeof(outfile), "sorted/%02x/%02x.bin", i, j);
|
||||||
|
|||||||
Reference in new issue
Block a user