summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-10-04 12:51:32 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-10-04 14:31:55 +0300
commite188767e3ee75e9417e361e1d005195c3efa0b99 (patch)
treef4bd954430017de617cb2209e3135f8b55854516
parent8bc1c54bc90dc587be5ffc9efbe4cbf3188cc8d2 (diff)
downloadlibrpm-tizen-e188767e3ee75e9417e361e1d005195c3efa0b99.tar.gz
librpm-tizen-e188767e3ee75e9417e361e1d005195c3efa0b99.tar.bz2
librpm-tizen-e188767e3ee75e9417e361e1d005195c3efa0b99.zip
Simplify queryformat popt callback handling
- No need to separate single vs multiple queryformats, rstrcat() works for both cases. Whether catenating multiply specified queryformats make sense is another question though... - This can't get called with NULL arg (or then popt screwed up its argument checking), dont bother checking.
-rw-r--r--lib/poptQV.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/poptQV.c b/lib/poptQV.c
index e31245010..8f163efda 100644
--- a/lib/poptQV.c
+++ b/lib/poptQV.c
@@ -140,15 +140,7 @@ static void queryArgCallback(poptContext con,
break;
case POPT_QUERYFORMAT:
- if (arg) {
- char * qf = (char *)qva->qva_queryFormat;
- if (qf) {
- rstrcat(&qf, arg);
- } else {
- qf = xstrdup(arg);
- }
- qva->qva_queryFormat = qf;
- }
+ rstrcat(&qva->qva_queryFormat, arg);
break;
case 'i':