Get rid of logging.c and most exit() calls replaced with return() for true library usage
This commit is contained in:
@@ -34,11 +34,11 @@ void *hc_dlsym (void *module, const char *symbol);
|
||||
if (noerr != -1) { \
|
||||
if (!ptr->name) { \
|
||||
if (noerr == 1) { \
|
||||
log_error ("ERROR: %s is missing from %s shared library.", #name, #libname); \
|
||||
exit (-1); \
|
||||
} else { \
|
||||
log_info ("WARNING: %s is missing from %s shared library.", #name, #libname); \
|
||||
event_log_error (hashcat_ctx, "%s is missing from %s shared library.", #name, #libname); \
|
||||
return -1; \
|
||||
} else { \
|
||||
event_log_warning (hashcat_ctx, "%s is missing from %s shared library.", #name, #libname); \
|
||||
return 0; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
@@ -48,11 +48,11 @@ void *hc_dlsym (void *module, const char *symbol);
|
||||
if (noerr != -1) { \
|
||||
if (!ptr->name) { \
|
||||
if (noerr == 1) { \
|
||||
log_error ("ERROR: %s is missing from %s shared library.", #name, #libname); \
|
||||
exit (-1); \
|
||||
} else { \
|
||||
log_info ("WARNING: %s is missing from %s shared library.", #name, #libname); \
|
||||
event_log_error (hashcat_ctx, "%s is missing from %s shared library.", #name, #libname); \
|
||||
return -1; \
|
||||
} else { \
|
||||
event_log_warning (hashcat_ctx, "%s is missing from %s shared library.", #name, #libname); \
|
||||
return 0; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
@@ -61,13 +61,12 @@ void *hc_dlsym (void *module, const char *symbol);
|
||||
ptr->name = (type) (*ptr->func) (addr); \
|
||||
if (!ptr->name) { \
|
||||
if (noerr == 1) { \
|
||||
log_error ("ERROR: %s at address %08x is missing from %s shared library.", #name, addr, #libname); \
|
||||
exit (-1); \
|
||||
} else { \
|
||||
log_error ("WARNING: %s at address %08x is missing from %s shared library.", #name, addr, #libname); \
|
||||
event_log_error (hashcat_ctx, "%s at address %08x is missing from %s shared library.", #name, addr, #libname); \
|
||||
return -1; \
|
||||
} else { \
|
||||
event_log_warning (hashcat_ctx, "%s at address %08x is missing from %s shared library.", #name, addr, #libname); \
|
||||
return 0; \
|
||||
} \
|
||||
}
|
||||
|
||||
#endif // _DYNALOADER_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user