From: Kristian Høgsberg Date: Mon, 7 Apr 2008 15:56:48 +0000 (-0400) Subject: Remove redundant curl initialization. X-Git-Tag: 0.1~162 X-Git-Url: http://project.juiblex.co.uk/git/?a=commitdiff_plain;h=bcb05b8d92c82487ac927a03995913000f1ec918;p=razor2.git%2F.git Remove redundant curl initialization. --- diff --git a/main.c b/main.c index 6ba3aa2..a192b3b 100644 --- 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 --- 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"; }