Convert Epoch parsing to use parseUnsignedNum()
authorJindrich Novy <jnovy@redhat.com>
Tue, 1 Jul 2008 10:42:12 +0000 (12:42 +0200)
committerJindrich Novy <jnovy@redhat.com>
Tue, 1 Jul 2008 10:54:13 +0000 (12:54 +0200)
build/parsePreamble.c

index d5ea09f..3f944ed 100644 (file)
@@ -592,10 +592,10 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag,
        break;
     case RPMTAG_EPOCH: {
        SINGLE_TOKEN_ONLY;
-       int epoch;
-       if (parseNum(field, &epoch)) {
+       uint32_t epoch;
+       if (parseUnsignedNum(field, &epoch)) {
            rpmlog(RPMLOG_ERR,
-                    _("line %d: Epoch field must be a number: %s\n"),
+                    _("line %d: Epoch field must be an unsigned number: %s\n"),
                     spec->lineNum, spec->line);
            return RPMRC_FAIL;
        }