aboutsummaryrefslogtreecommitdiffstats
path: root/src/initlog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/initlog.c')
-rw-r--r--src/initlog.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/initlog.c b/src/initlog.c
index 19d9f9aa..ae110675 100644
--- a/src/initlog.c
+++ b/src/initlog.c
@@ -284,11 +284,12 @@ int logEvent(char *cmd, int eventtype,char *string) {
struct logInfo logentry;
if (cmd) {
- logentry.cmd = strdup(basename(cmd));
+ logentry.cmd = basename(cmd);
if ((logentry.cmd[0] =='K' || logentry.cmd[0] == 'S') &&
( logentry.cmd[1] >= '0' && logentry.cmd[1] <= '9' ) &&
( logentry.cmd[2] >= '0' && logentry.cmd[2] <= '9' ) )
logentry.cmd+=3;
+ logentry.cmd = strdup(logentry.cmd);
} else
logentry.cmd = strdup(_("(none)"));
if (!string) {
@@ -317,11 +318,12 @@ int logString(char *cmd, char *string) {
int rc;
if (cmd) {
- logentry.cmd = strdup(basename(cmd));
+ logentry.cmd = basename(cmd);
if ((logentry.cmd[0] =='K' || logentry.cmd[0] == 'S') &&
( logentry.cmd[1] >= '0' && logentry.cmd[1] <= 0x39 ) &&
( logentry.cmd[2] >= '0' && logentry.cmd[2] <= 0x39 ) )
logentry.cmd+=3;
+ logentry.cmd = strdup(logentry.cmd);
} else
logentry.cmd = strdup(_(""));
logentry.line = strdup(string);