Remove redundant curl initialization.
authorKristian Høgsberg <krh@redhat.com>
Mon, 7 Apr 2008 15:56:48 +0000 (11:56 -0400)
committerKristian Høgsberg <krh@redhat.com>
Mon, 7 Apr 2008 15:56:48 +0000 (11:56 -0400)
main.c
rpm.c

diff --git a/main.c b/main.c
index 6ba3aa2..a192b3b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -544,7 +544,6 @@ command_install(int argc, const char *argv[])
        struct razor_set *system, *upstream, *next;
        struct razor_transaction *trans;
        char path[PATH_MAX], new_path[PATH_MAX];
-       CURL *curl;
        int errors, fd;
 
        /* Create the new next repo file up front to ensure exclusive
@@ -584,13 +583,7 @@ command_install(int argc, const char *argv[])
        razor_set_write_to_fd(next, fd);
        printf("wrote %s\n", new_path);
 
-       curl = curl_easy_init();
-       if (curl == NULL) {
-               unlink(new_path);
-               return 1;
-       }
-       razor_set_diff(system, next, download_package, curl);   
-       curl_easy_cleanup(curl);
+       razor_set_diff(system, next, download_package, NULL);   
 
        /* FIXME: We need to figure out the right install order here,
         * so the post and pre scripts can run. */
diff --git a/rpm.c b/rpm.c
index ffb17eb..320ae78 100644 (file)
--- a/rpm.c
+++ b/rpm.c
@@ -353,7 +353,7 @@ run_script(struct installer *installer,
        program = razor_rpm_get_indirect(installer->rpm, program_tag, NULL);
        script = razor_rpm_get_indirect(installer->rpm, script_tag, NULL);
        if (program == NULL && script == NULL) {
-               return;
+               return 0;
        } else if (program == NULL) {
                program = "/bin/sh";
        }