diff options
Diffstat (limited to 'contrib/ntp/sntp/libopts/init.c')
-rw-r--r-- | contrib/ntp/sntp/libopts/init.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/contrib/ntp/sntp/libopts/init.c b/contrib/ntp/sntp/libopts/init.c index 9374528..e02e1e1 100644 --- a/contrib/ntp/sntp/libopts/init.c +++ b/contrib/ntp/sntp/libopts/init.c @@ -9,7 +9,7 @@ /* * This file is part of AutoOpts, a companion to AutoGen. * AutoOpts is free software. - * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved + * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved * * AutoOpts is available under any one of two licenses. The license * in use must be one of these two and the choice is under the control @@ -69,7 +69,7 @@ validate_struct(tOptions * opts, char const * pname) */ if ((opts->fOptSet & OPTPROC_NO_XLAT_MASK) == OPTPROC_NXLAT_OPT) opts->fOptSet |= OPTPROC_NXLAT_OPT_CFG; - (*opts->pTransProc)(); + opts->pTransProc(); } /* @@ -81,10 +81,6 @@ validate_struct(tOptions * opts, char const * pname) && ( (opts->structVersion > OPTIONS_STRUCT_VERSION ) || (opts->structVersion < OPTIONS_MINIMUM_VERSION ) ) ) { - - static char const ao_ver_string[] = - STR(AO_CURRENT)":"STR(AO_REVISION)":"STR(AO_AGE)"\n"; - fprintf(stderr, zwrong_ver, pname, NUM_TO_VER(opts->structVersion)); if (opts->structVersion > OPTIONS_STRUCT_VERSION ) fputs(ztoo_new, stderr); @@ -101,17 +97,20 @@ validate_struct(tOptions * opts, char const * pname) */ if (opts->pzProgName == NULL) { char const * pz = strrchr(pname, DIRCH); + char const ** pp = + (char const **)(void **)&(opts->pzProgName); if (pz != NULL) - opts->pzProgName = pz+1; + *pp = pz+1; else - opts->pzProgName = pname; + *pp = pname; - pz = pathfind(getenv("PATH"), (char *)(intptr_t)pname, "rx"); + pz = pathfind(getenv("PATH"), (char *)pname, "rx"); if (pz != NULL) - pname = (void *)(intptr_t)pz; + pname = VOIDP(pz); - opts->pzProgPath = pname; + pp = (char const **)VOIDP(&(opts->pzProgPath)); + *pp = pname; /* * when comparing long names, these are equivalent |