Skip to content

Commit

Permalink
initialized struct with -1 as default value
Browse files Browse the repository at this point in the history
  • Loading branch information
Raghav Rawat committed Dec 10, 2024
1 parent 276e3ab commit 0aa5366
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
6 changes: 3 additions & 3 deletions source/server/cpu_affinity_configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#define CPU_AFFINITY_CONFIGURATION_H

struct CpuAffinityConfiguration {
int sideband_read_write;
int stream_write;
int server;
int sideband_read_write = -1;
int stream_write = -1;
int server = -1;
};

#endif // CPU_AFFINITY_CONFIGURATION_H
7 changes: 0 additions & 7 deletions source/server/server_configuration_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,13 +302,6 @@ CpuAffinityConfiguration ServerConfigurationParser::parse_cpu_affinity() const
cpu_affinity.stream_write = parse_cpu_affinity_with_key(kStreamWriteKey);
cpu_affinity.server = parse_cpu_affinity_with_key(kServerKey);
}
else{
// -1 is set as the default value for the cores which indicates that any available core can be used.
cpu_affinity.sideband_read_write = -1;
cpu_affinity.stream_write = -1;
cpu_affinity.server = -1;
}

return cpu_affinity;
}

Expand Down

0 comments on commit 0aa5366

Please sign in to comment.