Skip to content

Commit

Permalink
Fix possibly uninitialized variable
Browse files Browse the repository at this point in the history
(found by CPPcheck/Sonarqube)
  • Loading branch information
ralphlange committed Nov 28, 2023
1 parent a432dcd commit 1782290
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion devIocStats/os/Linux/osdMemUsage.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ int devIocStatsInitMemUsage(void) {
int devIocStatsGetMemUsage(memInfo *pval) {
static char statmfile[] = "/proc/self/statm";
static char memfile[] = "/proc/meminfo";
unsigned long size, resident, value, total = 0, memfree = 0;
unsigned long size, resident = 0, value, total = 0, memfree = 0;
char title[32] = "";
char units[32] = "";
int ret = 0;
Expand Down
2 changes: 1 addition & 1 deletion devIocStats/os/cygwin32/osdMemUsage.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ int devIocStatsInitMemUsage(void) {
int devIocStatsGetMemUsage(memInfo *pval) {
static char statmfile[] = "/proc/self/statm";
static char memfile[] = "/proc/meminfo";
unsigned long size, resident, value, total = 0, memfree = 0;
unsigned long size, resident = 0, value, total = 0, memfree = 0;
char title[32] = "";
char units[32] = "";
int ret = 0;
Expand Down

0 comments on commit 1782290

Please sign in to comment.