Skip to content

Commit 92b7817

Browse files
committed
ht2crack2: replace GLIB qsort_r by portable qsort
1 parent d6f1b3a commit 92b7817

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tools/hitag2crack/crack2/ht2crack2buildtable.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ static void makedirs(void) {
354354
}
355355
}
356356

357-
static int datacmp(const void *p1, const void *p2, void *dummy) {
357+
static int datacmp(const void *p1, const void *p2) {
358358
unsigned char *d_1 = (unsigned char *)p1;
359359
unsigned char *d_2 = (unsigned char *)p2;
360360

@@ -420,8 +420,7 @@ static void *sorttable(void *dd) {
420420
close(fdin);
421421

422422
// sort it
423-
void *dummy = NULL; // clang
424-
qsort_r(table, numentries, DATASIZE, datacmp, dummy);
423+
qsort(table, numentries, DATASIZE, datacmp);
425424

426425
// write to file
427426
snprintf(outfile, sizeof(outfile), "sorted/%02x/%02x.bin", i, j);

0 commit comments

Comments
 (0)