summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-08-19 18:53:55 -0400
committerMike Frysinger <vapier@gentoo.org>2008-08-19 18:57:57 -0400
commit2276dab53cdcfeba5aa2dcec39bf0d372d0ac601 (patch)
treecb4df047b31436959b0737d85a27d57212768b63
parentAdd a -S/--strip-path option (diff)
downloadrpm2targz-2276dab53cdcfeba5aa2dcec39bf0d372d0ac601.tar.gz
rpm2targz-2276dab53cdcfeba5aa2dcec39bf0d372d0ac601.tar.bz2
rpm2targz-2276dab53cdcfeba5aa2dcec39bf0d372d0ac601.zip
Declare explicit sign for char arrayv9.0.0.1g
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--rpmoffset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rpmoffset.c b/rpmoffset.c
index 32ccba2..10b7f4a 100644
--- a/rpmoffset.c
+++ b/rpmoffset.c
@@ -11,7 +11,7 @@
int main(int argc, char *argv[])
{
size_t i;
- char p[3];
+ unsigned char p[3];
if (argc != 1) {
puts("Usage: rpmoffset < rpmfile");
@@ -21,7 +21,7 @@ int main(int argc, char *argv[])
if (read(0,p,3) != 3)
return 2;
- for (i = 0; p[2] != 0 || p[2] != -1; ++i) {
+ for (i = 0; p[2] != 0 || p[2] != 0xff; ++i) {
if (p[0] == '\037' && p[1] == '\213' && p[2] == '\010') {
printf("%zu\n", i);
return 0;