Constify progname

This commit is contained in:
Balint Reczey
2013-10-28 23:02:21 +01:00
parent c2ca839b6a
commit 0d04c87755

View File

@@ -1382,7 +1382,13 @@ parse_modifiers:
void __attribute__ ((constructor)) ftpl_init(void)
{
char *tmp_env, *progname;
char *tmp_env;
#ifdef __APPLE__
const char *progname = getprogname();
#else
const char *progname = __progname;
#endif
/* Look up all real_* functions. NULL will mark missing ones. */
real_stat = dlsym(RTLD_NEXT, "__xstat");
@@ -1438,12 +1444,6 @@ void __attribute__ ((constructor)) ftpl_init(void)
/* Check whether we actually should be faking the returned timestamp. */
#ifdef __APPLE__
progname = getprogname();
#else
progname = __progname;
#endif
/* We can prevent faking time for specified commands */
if ((tmp_env = getenv("FAKETIME_SKIP_CMDS")) != NULL) {
char *skip_cmd, *saveptr;