summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'rpmoffset.c')
-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;