diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-04-14 15:58:10 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-04-14 15:58:10 +0300 |
commit | 08375fa2bce124043954feb8c9cc8023004586bf (patch) | |
tree | d5a159e4b006be16f5962e7ede59a2b3412492da | |
parent | 4e34fcc2bda4b6d18287981c1a053e9e4380caba (diff) | |
download | librpm-tizen-08375fa2bce124043954feb8c9cc8023004586bf.tar.gz librpm-tizen-08375fa2bce124043954feb8c9cc8023004586bf.tar.bz2 librpm-tizen-08375fa2bce124043954feb8c9cc8023004586bf.zip |
Add argvNew() to create an empty argv array
- yes it's silly ;)
-rw-r--r-- | rpmio/argv.c | 6 | ||||
-rw-r--r-- | rpmio/argv.h | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/rpmio/argv.c b/rpmio/argv.c index 7a09e3e50..302f71d12 100644 --- a/rpmio/argv.c +++ b/rpmio/argv.c @@ -23,6 +23,12 @@ void argvPrint(const char * msg, ARGV_const_t argv, FILE * fp) } +ARGV_t argvNew(void) +{ + ARGV_t argv = xcalloc(1, sizeof(*argv)); + return argv; +} + ARGI_t argiFree(ARGI_t argi) { if (argi) { diff --git a/rpmio/argv.h b/rpmio/argv.h index 745a2c64b..6d5dc1f1a 100644 --- a/rpmio/argv.h +++ b/rpmio/argv.h @@ -37,6 +37,13 @@ void argvPrint(const char * msg, ARGV_const_t argv, FILE * fp); */ ARGI_t argiFree(ARGI_t argi); + +/** \ingroup rpmargv + * Create an empty argv array. + * @return pointer to empty argv + */ +ARGV_t argvNew(void); + /** \ingroup rpmargv * Destroy an argv array. * @param argv argv array |