Skip to content

Commit

Permalink
stress-radixsort: add in missing const in strcmp casts
Browse files Browse the repository at this point in the history
Signed-off-by: Colin Ian King <[email protected]>
  • Loading branch information
ColinIanKing committed Mar 5, 2022
1 parent 1657286 commit bb97d94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stress-radixsort.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ static int stress_radixsort(const stress_args_t *args)

if (g_opt_flags & OPT_FLAGS_VERIFY) {
for (i = 0; i < n - 1; i++) {
if (strcmp((char *)data[i], (char *)data[i + 1]) > 0) {
if (strcmp((const char *)data[i], (const char *)data[i + 1]) > 0) {
pr_fail("%s: sort error "
"detected, incorrect ordering "
"found\n", args->name);
Expand All @@ -154,7 +154,7 @@ static int stress_radixsort(const stress_args_t *args)

if (g_opt_flags & OPT_FLAGS_VERIFY) {
for (i = 0; i < n - 1; i++) {
if (strcmp((char *)data[i], (char *)data[i + 1]) < 0) {
if (strcmp((const char *)data[i], (const char *)data[i + 1]) < 0) {
pr_fail("%s: sort error "
"detected, incorrect ordering "
"found\n", args->name);
Expand Down

0 comments on commit bb97d94

Please sign in to comment.