summaryrefslogtreecommitdiff
path: root/test/interactive-helper/rpmver.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-02-27 22:52:34 +0100
committerMichael Vogt <mvo@debian.org>2014-02-27 22:52:34 +0100
commitfce69e7a0f38299c57ef96ae1c1dd9a5379bfd5a (patch)
treebe7d18baa836e9df166ec63f6c9fe6f94bb84b40 /test/interactive-helper/rpmver.cc
parenta5e790985752c6820e08e7a7e650e1607fa826e4 (diff)
parentfc104da6a583736223b2f941e43a05ea26b63a7d (diff)
Merge branch 'debian/sid' into debian/experimental
Conflicts: apt-private/private-list.cc configure.ac debian/apt.install.in debian/changelog
Diffstat (limited to 'test/interactive-helper/rpmver.cc')
-rw-r--r--test/interactive-helper/rpmver.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/interactive-helper/rpmver.cc b/test/interactive-helper/rpmver.cc
index 9fc807de8..15c96cbbe 100644
--- a/test/interactive-helper/rpmver.cc
+++ b/test/interactive-helper/rpmver.cc
@@ -2,6 +2,7 @@
#include <rpm/rpmio.h>
#include <rpm/misc.h>
#include <stdlib.h>
+#include <stdio.h>
#include <ctype.h>
#define xisdigit(x) isdigit(x)
@@ -12,10 +13,8 @@ using namespace std;
int rpmvercmp(const char * a, const char * b)
{
- char oldch1, oldch2;
char * str1, * str2;
char * one, * two;
- int rc;
int isnum;
/* easy comparison to see if versions are identical */
@@ -53,9 +52,9 @@ int rpmvercmp(const char * a, const char * b)
/* save character at the end of the alpha or numeric segment */
/* so that they can be restored after the comparison */
- oldch1 = *str1;
+ char oldch1 = *str1;
*str1 = '\0';
- oldch2 = *str2;
+ char oldch2 = *str2;
*str2 = '\0';
/* take care of the case where the two version segments are */
@@ -81,7 +80,7 @@ int rpmvercmp(const char * a, const char * b)
/* segments are alpha or if they are numeric. don't return */
/* if they are equal because there might be more segments to */
/* compare */
- rc = strcmp(one, two);
+ int rc = strcmp(one, two);
if (rc) return rc;
/* restore character that was replaced by null above */