Skip to content
Snippets Groups Projects
Commit b2085515 authored by Lucas Magalhães's avatar Lucas Magalhães
Browse files

Fix uninitialized values in require.c

This was reported running cppcheck over require's code.
require-ess/src/require.c:1002:33: error: Uninitialized variable: &modulediroffs [uninitvar]
               dirname, module, &modulediroffs);
                                ^
require-ess/src/require.c:996:18: note: Assuming condition is false
      if (dirlen == 0) continue; /* ignore empty driverpath elements */
                 ^
require-ess/src/require.c:1002:33: note: Uninitialized variable: &modulediroffs
               dirname, module, &modulediroffs);
                                ^
parent 875791dc
No related branches found
No related tags found
No related merge requests found
......@@ -981,8 +981,8 @@ static int require_priv(
/* Search for module in driverpath */
for (dirname = driverpath; dirname != NULL; dirname = end) {
/* get one directory from driverpath */
int dirlen;
int modulediroffs;
int dirlen = 0;
int modulediroffs = 0;
DIR_HANDLE dir;
DIR_ENTRY direntry;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment