Skip to content

Commit

Permalink
[REFACT] Use get_number to get int param
Browse files Browse the repository at this point in the history
  • Loading branch information
hasherezade committed Apr 30, 2021
1 parent 2ab76a6 commit ea15863
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion params_info/param_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ bool get_int_param(int argc, char *argv[], const char *param, int &param_i,
char* mode_num = argv[param_i + 1];
const size_t len = strlen(mode_num);
if (is_dec(mode_num, len)) {
out_val = (PARAM_T)atoll(mode_num);
out_val = (PARAM_T)get_number(mode_num);
}
else {
if (callback) {
Expand Down
8 changes: 6 additions & 2 deletions util/time_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@ LONGLONG util::process_start_time(DWORD processID)
if (!hProcess) {
return INVALID_TIME;
}
FILETIME creationTime, exitTime, kernelTime, userTime;
creationTime = exitTime = kernelTime = userTime = { 0 };

FILETIME creationTime = { 0 };
FILETIME exitTime = { 0 };
FILETIME kernelTime = { 0 };
FILETIME userTime = { 0 };

BOOL isOk = GetProcessTimes(
hProcess,
&creationTime, &exitTime, &kernelTime, &userTime
Expand Down

0 comments on commit ea15863

Please sign in to comment.