lclint annotations.
CVS patchset: 3400 CVS date: 1999/10/25 19:07:14
This commit is contained in:
parent
ba1f155cdc
commit
b074f1e2e7
10
popt/popt.c
10
popt/popt.c
|
@ -111,8 +111,12 @@ void poptResetContext(poptContext con) {
|
|||
con->restLeftover = 0;
|
||||
con->doExec = NULL;
|
||||
|
||||
for (i = 0; i < con->finalArgvCount; i++)
|
||||
xfree(con->finalArgv[i]);
|
||||
for (i = 0; i < con->finalArgvCount; i++) {
|
||||
if (con->finalArgv[i]) {
|
||||
xfree(con->finalArgv[i]);
|
||||
con->finalArgv[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
con->finalArgvCount = 0;
|
||||
}
|
||||
|
@ -329,7 +333,7 @@ static const char *findNextArg(poptContext con, unsigned argx, int delete)
|
|||
return arg;
|
||||
}
|
||||
|
||||
static const char * expandNextArg(poptContext con, const char * s)
|
||||
static /*@only@*/ const char * expandNextArg(poptContext con, const char * s)
|
||||
{
|
||||
const char *a;
|
||||
size_t alen;
|
||||
|
|
|
@ -23,10 +23,10 @@ typedef struct {
|
|||
|
||||
struct optionStackEntry {
|
||||
int argc;
|
||||
/*@keep@*/ const char ** argv;
|
||||
/*@only@*/ const char ** argv;
|
||||
/*@only@*/ pbm_set * argb;
|
||||
int next;
|
||||
/*@keep@*/ const char * nextArg;
|
||||
/*@only@*/ const char * nextArg;
|
||||
/*@keep@*/ const char * nextCharArg;
|
||||
/*@dependent@*/ struct poptAlias * currAlias;
|
||||
int stuffed;
|
||||
|
|
|
@ -21,7 +21,8 @@ int poptDupArgv(int argc, const char **argv,
|
|||
nb += strlen(argv[i]) + 1;
|
||||
}
|
||||
|
||||
argv2 = (void *) dst = malloc(nb);
|
||||
dst = malloc(nb);
|
||||
argv2 = (void *) dst;
|
||||
dst += (argc + 1) * sizeof(*argv);
|
||||
|
||||
for (i = 0; i < argc; i++) {
|
||||
|
|
Loading…
Reference in New Issue