Make rpmtdFromStringArray() data argument const afterall
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 17 Jun 2008 13:04:12 +0000 (16:04 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 17 Jun 2008 13:04:12 +0000 (16:04 +0300)
- produces somewhat less warnings as is, a bit surprisingly

lib/rpmtd.c
lib/rpmtd.h

index e5faa27..761f03b 100644 (file)
@@ -326,7 +326,7 @@ int rpmtdFromString(rpmtd td, rpmTag tag, const char *data)
     return rc;
 }
 
-int rpmtdFromStringArray(rpmtd td, rpmTag tag, char **data, rpm_count_t count)
+int rpmtdFromStringArray(rpmtd td, rpmTag tag, const char **data, rpm_count_t count)
 {
     rpmTagType type = rpmTagGetType(tag) & RPM_MASK_TYPE;
     if (type != RPM_STRING_ARRAY_TYPE || count < 1)
index 6d30c70..6d844b6 100644 (file)
@@ -271,7 +271,7 @@ int rpmtdFromString(rpmtd td, rpmTag tag, const char *data);
  * @param count                Number of entries
  * @return             1 on success, 0 on error (eg wrong type)
  */
-int rpmtdFromStringArray(rpmtd td, rpmTag tag, char **data, rpm_count_t count);
+int rpmtdFromStringArray(rpmtd td, rpmTag tag, const char **data, rpm_count_t count);
 
 /** \ingroup rpmtd
  * Construct tag container from ARGV_t array.