Remove redundant curl initialization.
authorKristian H?gsberg <krh@redhat.com>
Mon Apr 07 11:56:48 2008 -0400 (2008-04-07)
changeset 202e8594c82dffc
parent 201 180849700965
child 203 e0047e89db07
Remove redundant curl initialization.
main.c
rpm.c
     1.1 --- a/main.c	Mon Apr 07 01:19:13 2008 -0400
     1.2 +++ b/main.c	Mon Apr 07 11:56:48 2008 -0400
     1.3 @@ -544,7 +544,6 @@
     1.4  	struct razor_set *system, *upstream, *next;
     1.5  	struct razor_transaction *trans;
     1.6  	char path[PATH_MAX], new_path[PATH_MAX];
     1.7 -	CURL *curl;
     1.8  	int errors, fd;
     1.9  
    1.10  	/* Create the new next repo file up front to ensure exclusive
    1.11 @@ -584,13 +583,7 @@
    1.12  	razor_set_write_to_fd(next, fd);
    1.13  	printf("wrote %s\n", new_path);
    1.14  
    1.15 -	curl = curl_easy_init();
    1.16 -	if (curl == NULL) {
    1.17 -		unlink(new_path);
    1.18 -		return 1;
    1.19 -	}
    1.20 -	razor_set_diff(system, next, download_package, curl);	
    1.21 -	curl_easy_cleanup(curl);
    1.22 +	razor_set_diff(system, next, download_package, NULL);	
    1.23  
    1.24  	/* FIXME: We need to figure out the right install order here,
    1.25  	 * so the post and pre scripts can run. */
     2.1 --- a/rpm.c	Mon Apr 07 01:19:13 2008 -0400
     2.2 +++ b/rpm.c	Mon Apr 07 11:56:48 2008 -0400
     2.3 @@ -353,7 +353,7 @@
     2.4  	program = razor_rpm_get_indirect(installer->rpm, program_tag, NULL);
     2.5  	script = razor_rpm_get_indirect(installer->rpm, script_tag, NULL);
     2.6  	if (program == NULL && script == NULL) {
     2.7 -		return;
     2.8 +		return 0;
     2.9  	} else if (program == NULL) {
    2.10  		program = "/bin/sh";
    2.11  	}