remove redundant zeroing

This commit is contained in:
nhmall
2024-11-13 17:36:47 -05:00
parent b8083733de
commit c7591c0e08
+5 -6
View File
@@ -31,14 +31,13 @@ sys_early_init(void)
sysopt.wizards = (char *) 0; sysopt.wizards = (char *) 0;
#else #else
if (sysopt.wizards) if (sysopt.wizards)
free((genericptr_t) sysopt.wizards), sysopt.wizards = (char *) 0; free((genericptr_t) sysopt.wizards);
sysopt.wizards = dupstr(WIZARD_NAME); sysopt.wizards = dupstr(WIZARD_NAME);
#endif #endif
if ((p = getenv("DEBUGFILES")) != 0) { if ((p = getenv("DEBUGFILES")) != 0) {
if (sysopt.debugfiles) if (sysopt.debugfiles)
free((genericptr_t) sysopt.debugfiles), free((genericptr_t) sysopt.debugfiles);
sysopt.debugfiles = (char *) 0;
sysopt.debugfiles = dupstr(p); sysopt.debugfiles = dupstr(p);
sysopt.env_dbgfl = 1; /* prevent sysconf processing from overriding */ sysopt.env_dbgfl = 1; /* prevent sysconf processing from overriding */
} else { } else {
@@ -46,7 +45,7 @@ sys_early_init(void)
sysopt.debugfiles = (char *) 0; sysopt.debugfiles = (char *) 0;
#else #else
if (sysopt.debugfiles) if (sysopt.debugfiles)
free((genericptr_t) sysopt.debugfiles), sysopt.debugfiles = (char *) 0; free((genericptr_t) sysopt.debugfiles);
sysopt.debugfiles = dupstr(DEBUGFILES); sysopt.debugfiles = dupstr(DEBUGFILES);
#endif #endif
sysopt.env_dbgfl = 0; sysopt.env_dbgfl = 0;
@@ -77,10 +76,10 @@ sys_early_init(void)
#ifdef PANICTRACE #ifdef PANICTRACE
/* panic options */ /* panic options */
if (sysopt.gdbpath) if (sysopt.gdbpath)
free((genericptr_t) sysopt.gdbpath), sysopt.gdbpath = (char *) 0; free((genericptr_t) sysopt.gdbpath);
sysopt.gdbpath = dupstr(GDBPATH); sysopt.gdbpath = dupstr(GDBPATH);
if (sysopt.greppath) if (sysopt.greppath)
free((genericptr_t) sysopt.greppath), sysopt.greppath = (char *) 0; free((genericptr_t) sysopt.greppath);
sysopt.greppath = dupstr(GREPPATH); sysopt.greppath = dupstr(GREPPATH);
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
sysopt.panictrace_gdb = 1; sysopt.panictrace_gdb = 1;