*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/path.c,v 1.42 2004/11/06 01:16:22 tgl Exp $
+ * $PostgreSQL: pgsql/src/port/path.c,v 1.43 2004/11/06 04:24:14 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#if defined(__CYGWIN__) || defined(WIN32)
/* strip .exe suffix, regardless of case */
if (strlen(nodir_name) > sizeof(EXE) - 1 &&
- pg_strcasecmp(nodir_name + strlen(nodir_name)-sizeof(EXE)-1, EXE) == 0)
+ pg_strcasecmp(nodir_name + strlen(nodir_name)-(sizeof(EXE)-1), EXE) == 0)
{
char *progname;
fprintf(stderr, "%s: out of memory\n", nodir_name);
exit(1); /* This could exit the postmaster */
}
- progname[strlen(progname) - sizeof(EXE) - 1] = '\0';
+ progname[strlen(progname) - (sizeof(EXE) - 1)] = '\0';
nodir_name = progname;
}
#endif