logentry.cmd = strdup(logentry.cmd);
int logString(char *cmd, char *string) {    struct logInfo logentry;    int rc;        if (cmd) {	logentry.cmd = strdup(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;    } else      logentry.cmd = strdup(_(""));    logentry.line = strdup(string);    logentry.pri = logpriority;    logentry.fac = logfacility;        rc = logLine(&logentry);    free(logentry.line);    free(logentry.cmd);    return rc;}