diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-07-09 09:28:45 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-07-09 09:28:45 +0300 |
commit | 2db564a85a57db624cc73dd0bb7b2875cff44f3d (patch) | |
tree | f8a8a01cda649236e06dedc4c48741f47b9407e3 | |
parent | 6649c23cac5823d0c7415df5cfd66e5aac5eebd2 (diff) | |
download | rpm-2db564a85a57db624cc73dd0bb7b2875cff44f3d.tar.gz rpm-2db564a85a57db624cc73dd0bb7b2875cff44f3d.tar.bz2 rpm-2db564a85a57db624cc73dd0bb7b2875cff44f3d.zip |
Fix compiler warning on const free
- we dont need popt to set the file variable as we manually process
-rw-r--r-- | build/parseFiles.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/build/parseFiles.c b/build/parseFiles.c index b6ceb4cb1..6bb76f822 100644 --- a/build/parseFiles.c +++ b/build/parseFiles.c @@ -18,12 +18,11 @@ int parseFiles(rpmSpec spec) int arg; const char ** argv = NULL; const char *name = NULL; - const char *file = NULL; int flag = PART_SUBNAME; poptContext optCon = NULL; struct poptOption optionsTable[] = { { NULL, 'n', POPT_ARG_STRING, &name, 'n', NULL, NULL}, - { NULL, 'f', POPT_ARG_STRING, &file, 'f', NULL, NULL}, + { NULL, 'f', POPT_ARG_STRING, NULL, 'f', NULL, NULL}, { 0, 0, 0, 0, 0, NULL, NULL} }; @@ -67,7 +66,7 @@ int parseFiles(rpmSpec spec) for (arg=1; arg<argc; arg++) { if (!strcmp(argv[arg], "-f") && argv[arg+1]) { - file = rpmGetPath(argv[arg+1], NULL); + char *file = rpmGetPath(argv[arg+1], NULL); if (!pkg->fileFile) pkg->fileFile = newStringBuf(); appendLineStringBuf(pkg->fileFile, file); free(file); |