Skip to content

Commit

Permalink
xxx
Browse files Browse the repository at this point in the history
  • Loading branch information
lefessan committed Dec 21, 2023
1 parent 305d20f commit 08900fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions libcob/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -7735,7 +7735,7 @@ var_print (const char *msg, const char *val, const char *default_val,
}

/* Returns a pointer to the last string following a /, \ or : */
static const char *
static char *
get_basename (const char *s)
{
char buf [COB_NORMAL_BUFF];
Expand Down Expand Up @@ -7841,7 +7841,7 @@ cob_expand_env_string (const char *strval)
k--;
} else if (strval[k] == '$') {
struct cob_time time;
int need_free = 0;
char *need_free = NULL;
const char *s = NULL;
switch ( strval[k+1] ){
case '$': /* Replace $$ with process-id */
Expand All @@ -7852,8 +7852,8 @@ cob_expand_env_string (const char *strval)
s = cobglobptr->cob_main_argv0;
break;
case 'b': /* $b is the executable basename */
need_free = 1;
s = get_basename (cobglobptr->cob_main_argv0);
need_free = get_basename (cobglobptr->cob_main_argv0);
s = need_free;
break;
case 'd': /* $d date as yyyymmdd */
time = cob_get_current_datetime (DTR_DATE);
Expand Down Expand Up @@ -7881,7 +7881,7 @@ cob_expand_env_string (const char *strval)
}
j += sprintf (&env[j], "%s", s);
k++;
if (need_free) cob_free(s);
if (need_free) cob_free(need_free);
}
} else if (!isspace ((unsigned char)strval[k])) {
env[j++] = strval[k];
Expand Down
2 changes: 1 addition & 1 deletion libcob/profiling.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ cob_prof_print_line (
case 'T':
case 't':
if (info){
fprintf (file, "%Ld", time);
fprintf (file, "%lld", time);
} else {
fputs ("time-ns", file);
}
Expand Down

0 comments on commit 08900fb

Please sign in to comment.