Merge pull request #1460 from neheb/const

Fix cast qual with double pointers
pull/1463/head
Jens Steube 7 years ago committed by GitHub
commit f70999b305
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,8 +16,8 @@
int sort_by_stringptr (const void *p1, const void *p2) int sort_by_stringptr (const void *p1, const void *p2)
{ {
const char **s1 = (const char **) p1; const char* const *s1 = (const char* const *) p1;
const char **s2 = (const char **) p2; const char* const *s2 = (const char* const *) p2;
return strcmp (*s1, *s2); return strcmp (*s1, *s2);
} }

@ -13,8 +13,8 @@
static int sort_by_mtime (const void *p1, const void *p2) static int sort_by_mtime (const void *p1, const void *p2)
{ {
const char **f1 = (const char **) p1; const char* const *f1 = (const char* const *) p1;
const char **f2 = (const char **) p2; const char* const *f2 = (const char* const *) p2;
hc_stat_t s1; hc_stat_t s1;
hc_stat_t s2; hc_stat_t s2;

@ -69,8 +69,8 @@ static char *status_get_rules_file (const hashcat_ctx_t *hashcat_ctx)
void format_timer_display (struct tm *tm, char *buf, size_t len) void format_timer_display (struct tm *tm, char *buf, size_t len)
{ {
const char *time_entities_s[] = { "year", "day", "hour", "min", "sec" }; const char *const time_entities_s[] = { "year", "day", "hour", "min", "sec" };
const char *time_entities_m[] = { "years", "days", "hours", "mins", "secs" }; const char *const time_entities_m[] = { "years", "days", "hours", "mins", "secs" };
if (tm->tm_year - 70) if (tm->tm_year - 70)
{ {

@ -8,7 +8,7 @@
#include "shared.h" #include "shared.h"
#include "usage.h" #include "usage.h"
static const char *USAGE_MINI[] = static const char *const USAGE_MINI[] =
{ {
"Usage: %s [options]... hash|hashfile|hccapxfile [dictionary|mask|directory]...", "Usage: %s [options]... hash|hashfile|hccapxfile [dictionary|mask|directory]...",
"", "",
@ -16,7 +16,7 @@ static const char *USAGE_MINI[] =
NULL NULL
}; };
static const char *USAGE_BIG[] = static const char *const USAGE_BIG[] =
{ {
"%s - advanced password recovery", "%s - advanced password recovery",
"", "",

Loading…
Cancel
Save