=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/log.c,v retrieving revision 1.26 retrieving revision 1.27 diff -c -r1.26 -r1.27 *** src/usr.bin/cvs/log.c 2005/09/19 15:45:16 1.26 --- src/usr.bin/cvs/log.c 2005/10/09 23:59:17 1.27 *************** *** 1,4 **** ! /* $OpenBSD: log.c,v 1.26 2005/09/19 15:45:16 niallo Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: log.c,v 1.27 2005/10/09 23:59:17 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 208,213 **** --- 208,214 ---- char prefix[64], buf[1024], ebuf[255]; FILE *out; #if !defined(RCSPROG) + char *cmdname; struct cvs_cmd *cmdp; #endif *************** *** 225,231 **** /* always use the command name in error messages, not aliases */ #if !defined(RCSPROG) ! cmdp = cvs_findcmd(cvs_command); /* The cvs program appends the command name to the program name */ if (level == LP_TRACE) { --- 226,237 ---- /* always use the command name in error messages, not aliases */ #if !defined(RCSPROG) ! if (cvs_command == NULL) ! cmdname = " "; ! else { ! cmdp = cvs_findcmd(cvs_command); ! cmdname = cmdp->cmd_name; ! } /* The cvs program appends the command name to the program name */ if (level == LP_TRACE) { *************** *** 235,244 **** } else if (cvs_command != NULL) { if (level == LP_ABORT) snprintf(prefix, sizeof(prefix), "%s [%s aborted]", ! __progname, cmdp->cmd_name); else snprintf(prefix, sizeof(prefix), "%s %s", __progname, ! cmdp->cmd_name); } else /* just use the standard strlcpy */ #endif strlcpy(prefix, __progname, sizeof(prefix)); --- 241,250 ---- } else if (cvs_command != NULL) { if (level == LP_ABORT) snprintf(prefix, sizeof(prefix), "%s [%s aborted]", ! __progname, cmdname); else snprintf(prefix, sizeof(prefix), "%s %s", __progname, ! cmdname); } else /* just use the standard strlcpy */ #endif strlcpy(prefix, __progname, sizeof(prefix));