mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
libopts: updated to 5.18.6
This commit is contained in:
@@ -8,7 +8,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
|
||||
@@ -31,8 +31,8 @@
|
||||
* private:
|
||||
*
|
||||
* what: process an option with a time duration.
|
||||
* arg: + tOptions* + opts + program options descriptor +
|
||||
* arg: + tOptDesc* + od + the descriptor for this arg +
|
||||
* arg: + tOptions * + opts + program options descriptor +
|
||||
* arg: + tOptDesc * + od + the descriptor for this arg +
|
||||
*
|
||||
* doc:
|
||||
* Decipher a time duration value.
|
||||
@@ -64,8 +64,8 @@ optionTimeVal(tOptions * opts, tOptDesc * od)
|
||||
* private:
|
||||
*
|
||||
* what: process an option with a time and date.
|
||||
* arg: + tOptions* + opts + program options descriptor +
|
||||
* arg: + tOptDesc* + od + the descriptor for this arg +
|
||||
* arg: + tOptions * + opts + program options descriptor +
|
||||
* arg: + tOptDesc * + od + the descriptor for this arg +
|
||||
*
|
||||
* doc:
|
||||
* Decipher a time and date value.
|
||||
@@ -90,8 +90,10 @@ optionTimeDate(tOptions * opts, tOptDesc * od)
|
||||
|
||||
if (envptr == NULL) {
|
||||
static char const fmt[] = "DATEMSK=%s/datemsk";
|
||||
envptr = AGALOC(sizeof(fmt) + strlen(opts->pzPkgDataDir), fmt);
|
||||
sprintf(envptr, fmt, opts->pzPkgDataDir);
|
||||
size_t sz = sizeof(fmt) + strlen(opts->pzPkgDataDir);
|
||||
envptr = AGALOC(sz, fmt);
|
||||
if (snprintf(envptr, sz, fmt, opts->pzPkgDataDir) >= sz)
|
||||
option_exits(EXIT_FAILURE);
|
||||
|
||||
putenv(envptr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user