Skip to content

Commit

Permalink
Call cl_initialize_crypto() in cl_init()
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn Webb committed Jul 4, 2014
1 parent b1351d6 commit 78ee225
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 12 deletions.
2 changes: 0 additions & 2 deletions clambc/bcrun.c
Expand Up @@ -242,8 +242,6 @@ int main(int argc, char *argv[])
int fd = -1;
unsigned tracelevel;

cl_initialize_crypto();

if(check_flevel())
exit(1);

Expand Down
2 changes: 0 additions & 2 deletions clamconf/clamconf.c
Expand Up @@ -372,8 +372,6 @@ int main(int argc, char **argv)
unsigned int i, j;
struct cli_environment env;

cl_initialize_crypto();

opts = optparse(NULL, argc, argv, 1, OPT_CLAMCONF, 0, NULL);
if(!opts) {
printf("ERROR: Can't parse command line options\n");
Expand Down
2 changes: 0 additions & 2 deletions clamd/clamd.c
Expand Up @@ -137,8 +137,6 @@ int main(int argc, char **argv)
sigaction(SIGUSR2, &sa, NULL);
#endif

cl_initialize_crypto();

if((opts = optparse(NULL, argc, argv, 1, OPT_CLAMD, 0, NULL)) == NULL) {
mprintf("!Can't parse command line options\n");
return 1;
Expand Down
2 changes: 0 additions & 2 deletions clamdscan/clamdscan.c
Expand Up @@ -68,8 +68,6 @@ int main(int argc, char **argv)
struct sigaction sigact;
#endif

cl_initialize_crypto();

if((opts = optparse(NULL, argc, argv, 1, OPT_CLAMDSCAN, OPT_CLAMSCAN, NULL)) == NULL) {
mprintf("!Can't parse command line options\n");
return 2;
Expand Down
2 changes: 0 additions & 2 deletions freshclam/freshclam.c
Expand Up @@ -298,8 +298,6 @@ main (int argc, char **argv)
if (check_flevel ())
exit (FCE_INIT);

cl_initialize_crypto();

if ((retcl = cl_init (CL_INIT_DEFAULT)))
{
mprintf ("!Can't initialize libclamav: %s\n", cl_strerror (retcl));
Expand Down
2 changes: 2 additions & 0 deletions libclamav/others.c
Expand Up @@ -286,6 +286,8 @@ int cl_init(unsigned int initoptions)
struct timeval tv;
unsigned int pid = (unsigned int) getpid();

cl_initialize_crypto();

{
unrar_main_header_t x;
if (((char*)&x.flags - (char*)&x) != 3) {
Expand Down
2 changes: 0 additions & 2 deletions sigtool/sigtool.c
Expand Up @@ -2991,8 +2991,6 @@ int main(int argc, char **argv)
if(check_flevel())
exit(1);

cl_initialize_crypto();

if((ret = cl_init(CL_INIT_DEFAULT)) != CL_SUCCESS) {
mprintf("!Can't initialize libclamav: %s\n", cl_strerror(ret));
return -1;
Expand Down

0 comments on commit 78ee225

Please sign in to comment.