Initialize pointers, lowercase local variable
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 9 Apr 2008 08:17:43 +0000 (11:17 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 9 Apr 2008 08:18:57 +0000 (11:18 +0300)
rpmdb/hdrNVR.c

index a7f36a3..37bc11b 100644 (file)
@@ -90,18 +90,18 @@ char * headerGetNEVRA(Header h, const char ** np)
 char * headerGetEVR(Header h, const char ** np)
 {
     const char *n, *v, *r;
-    char *EVR;
+    char *evr = NULL;
     int32_t *e;
 
     (void) headerNEVRA(h, &n, &e, &v, &r, NULL);
     if (e) {
-       rasprintf(&EVR, "%d:%s-%s", *e, v, r);
+       rasprintf(&evr, "%d:%s-%s", *e, v, r);
     } else {
-       rasprintf(&EVR, "%s-%s", v, r);
+       rasprintf(&evr, "%s-%s", v, r);
     }
     if (np) 
        *np = n;
-    return EVR;
+    return evr;
 }
 
 rpm_color_t headerGetColor(Header h)