Skip to content

Commit

Permalink
Fix: adjust format with clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
jjnicola committed Oct 21, 2022
1 parent 72ef876 commit 6ca43e3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
3 changes: 1 addition & 2 deletions misc/scanneraux.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@

#include "scanneraux.h"


void
destroy_scan_globals (struct scan_globals *globals)
{
if (globals == NULL)
return;

g_free (globals->scan_id);

if (globals->files_translation)
Expand Down
11 changes: 5 additions & 6 deletions nasl/lint.c
Original file line number Diff line number Diff line change
Expand Up @@ -859,9 +859,9 @@ nasl_lint (lex_ctxt *lexic, tree_cell *st)
make_call_func_list (lexic_aux, st, &called_funcs);

/* Loads all defined functions. */
ret = nasl_lint_def (lexic_aux, st, lint_mode, &include_files,
&func_fnames_tab, err_fname, &called_funcs,
&def_func_tree);
ret =
nasl_lint_def (lexic_aux, st, lint_mode, &include_files, &func_fnames_tab,
err_fname, &called_funcs, &def_func_tree);
if (ret == NULL)
{
inc_errors_cnt ();
Expand All @@ -886,9 +886,8 @@ nasl_lint (lex_ctxt *lexic, tree_cell *st)

/* Now check that each function was loaded just once. */
lint_mode = 0;
ret = nasl_lint_def (lexic, st, lint_mode, &include_files,
&func_fnames_tab, err_fname, &called_funcs,
&def_func_tree);
ret = nasl_lint_def (lexic, st, lint_mode, &include_files, &func_fnames_tab,
err_fname, &called_funcs, &def_func_tree);
if (ret == NULL)
{
inc_errors_cnt ();
Expand Down
16 changes: 8 additions & 8 deletions nasl/nasl_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,15 +554,15 @@ nasl_same_host (lex_ctxt *lexic)

for (i = 0; i < 2; i++)
g_free (a[i]);
//if (cmp_hostname)
// if (cmp_hostname)
// {
for (i = 0; i < 2; i++)
{
for (j = 0; j < names_nb[i]; j++)
g_free (names[i][j]);
g_free (names[i]);
}
// }
for (i = 0; i < 2; i++)
{
for (j = 0; j < names_nb[i]; j++)
g_free (names[i][j]);
g_free (names[i]);
}
// }
return retc;
}

Expand Down
4 changes: 2 additions & 2 deletions nasl/nasl_snmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,13 +778,13 @@ nasl_snmpv3_get_action (lex_ctxt *lexic, u_char action)
g_free (request);
return array_from_snmp_error (-2, "Invalid protocol value");
}

if (!privproto || !request->privpass)
{
g_free (request);
return array_from_snmp_error (-2, "Missing privproto or privpass");
}

if (!strcasecmp (authproto, "md5"))
request->authproto = 0;
else if (!strcasecmp (authproto, "sha1"))
Expand Down
2 changes: 1 addition & 1 deletion src/openvas.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ openvas (int argc, char *argv[], char *env[])
set_scan_id (g_strdup (scan_id));
globals = g_malloc0 (sizeof (struct scan_globals));
globals->scan_id = g_strdup (get_scan_id ());

err = attack_network_init (globals, config_file);
if (err != 0)
{
Expand Down

0 comments on commit 6ca43e3

Please sign in to comment.