Skip to content

Commit

Permalink
Fix two missing instances of string copy refactoring
Browse files Browse the repository at this point in the history
These two locations are only enabled via `--enable-debug`.
  • Loading branch information
cgzones authored and allinurl committed May 14, 2024
1 parent e49a3e4 commit b45ab0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/gholder.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ load_holder_data (GRawData *raw_data, GHolder *h, GModule module, GSort sort) {
#ifdef _DEBUG
clock_t begin = clock ();
double taken;
char *modstr = NULL;
const char *modstr = NULL;
LOG_DEBUG (("== load_holder_data ==\n"));
#endif

Expand All @@ -680,6 +680,5 @@ load_holder_data (GRawData *raw_data, GHolder *h, GModule module, GSort sort) {
modstr = get_module_str (module);
taken = (double) (clock () - begin) / CLOCKS_PER_SEC;
LOG_DEBUG (("== %-30s%f\n\n", modstr, taken));
free (modstr);
#endif
}
3 changes: 1 addition & 2 deletions src/gkmhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ parse_raw_data (GModule module) {
#ifdef _DEBUG
clock_t begin = clock ();
double taken;
char *modstr = NULL;
const char *modstr = NULL;
LOG_DEBUG (("== parse_raw_data ==\n"));
#endif

Expand All @@ -1459,7 +1459,6 @@ parse_raw_data (GModule module) {
modstr = get_module_str (module);
taken = (double) (clock () - begin) / CLOCKS_PER_SEC;
LOG_DEBUG (("== %-30s%f\n\n", modstr, taken));
free (modstr);
#endif

return raw_data;
Expand Down

0 comments on commit b45ab0d

Please sign in to comment.