Eliminate a couple more dead increments in spec parsing code
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 27 May 2011 06:59:55 +0000 (09:59 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 27 May 2011 12:05:34 +0000 (15:05 +0300)
build/parseChangelog.c
build/parseSpec.c

index d4681cb..eed9842 100644 (file)
@@ -80,7 +80,7 @@ static int dateToTimet(const char * datestr, time_t * secs)
     /* year */
     p = pe; SKIPSPACE(p);
     if (*p == '\0') goto exit;
-    pe = p; SKIPNONSPACE(pe); if (*pe != '\0') *pe++ = '\0';
+    pe = p; SKIPNONSPACE(pe); if (*pe != '\0') *pe = '\0';
     time.tm_year = strtol(p, &q, 10);
     if (!(q && *q == '\0')) goto exit;
     if (time.tm_year < 1990 || time.tm_year >= 3000) goto exit;
index d0970a8..975867a 100644 (file)
@@ -162,7 +162,7 @@ static int copyNextLineFromOFI(rpmSpec spec, OFI_t *ofi)
        while (from && *from && ch != '\n')
            ch = *to++ = *from++;
        spec->lbufPtr = to;
-       *to++ = '\0';
+       *to = '\0';
        ofi->readPtr = from;
 
        /* Check if we need another line before expanding the buffer. */