diff options
author | jbj <devnull@localhost> | 1999-10-25 18:24:38 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-10-25 18:24:38 +0000 |
commit | ba1f155cdcd759363d00a1d0a9317c720c584d84 (patch) | |
tree | 38b2f48cd70e8d408719ba5d79b9276ecd5d8b0b /popt/popt.c | |
parent | 1cdcd275a8b81a8e5258a0696ab198ccfd7408ca (diff) | |
download | librpm-tizen-ba1f155cdcd759363d00a1d0a9317c720c584d84.tar.gz librpm-tizen-ba1f155cdcd759363d00a1d0a9317c720c584d84.tar.bz2 librpm-tizen-ba1f155cdcd759363d00a1d0a9317c720c584d84.zip |
Lazy allocation of deleted arg bit map.
CVS patchset: 3399
CVS date: 1999/10/25 18:24:38
Diffstat (limited to 'popt/popt.c')
-rw-r--r-- | popt/popt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/popt/popt.c b/popt/popt.c index 6b829887b..4eeb8feed 100644 --- a/popt/popt.c +++ b/popt/popt.c @@ -52,7 +52,7 @@ poptContext poptGetContext(const char * name, int argc, char ** argv, con->os = con->optionStack; con->os->argc = argc; con->os->argv = (const char **)argv; /* XXX don't change the API */ - con->os->argb = PBM_ALLOC(argc); + con->os->argb = NULL; if (!(flags & POPT_CONTEXT_KEEP_FIRST)) con->os->next = 1; /* skip argv[0] */ @@ -99,7 +99,7 @@ void poptResetContext(poptContext con) { } if (con->os->argb) { PBM_FREE(con->os->argb); - con->os->argb = PBM_ALLOC(con->os->argc); + con->os->argb = NULL; } con->os->currAlias = NULL; con->os->nextCharArg = NULL; @@ -197,7 +197,7 @@ static int handleAlias(poptContext con, const char * longName, char shortName, con->os->currAlias = con->aliases + i; poptDupArgv(con->os->currAlias->argc, con->os->currAlias->argv, &con->os->argc, &con->os->argv); - con->os->argb = PBM_ALLOC(con->os->argc); + con->os->argb = NULL; return 1; } @@ -693,7 +693,7 @@ int poptStuffArgs(poptContext con, const char ** argv) { con->os->nextCharArg = NULL; con->os->currAlias = NULL; poptDupArgv(argc, argv, &con->os->argc, &con->os->argv); - con->os->argb = PBM_ALLOC(argc); + con->os->argb = NULL; con->os->stuffed = 1; return 0; |