lib/download.c: style twerks.

This commit is contained in:
Juan RP 2014-08-13 21:49:44 +02:00
parent a6699be973
commit 431674d733

View File

@ -341,8 +341,7 @@ xbps_fetch_delta(struct xbps_handle *xhp, const char *basefile, const char *uri,
} }
if ((pid = fork()) == 0) { if ((pid = fork()) == 0) {
execl(xdelta, xdelta, "-d", "-f", "-s", basefile, dname, tempfile, execl(xdelta, xdelta, "-d", "-f", "-s", basefile, dname, tempfile, NULL);
NULL);
exit(127); exit(127);
} else if (pid < 0) { } else if (pid < 0) {
xbps_dbg_printf(xhp, "error while forking, fallback to full " xbps_dbg_printf(xhp, "error while forking, fallback to full "
@ -355,7 +354,7 @@ xbps_fetch_delta(struct xbps_handle *xhp, const char *basefile, const char *uri,
exitcode = WEXITSTATUS(status); exitcode = WEXITSTATUS(status);
unlink(dname); unlink(dname);
switch(exitcode) { switch (exitcode) {
case 0: // success case 0: // success
rv = 1; rv = 1;
if (rename(tempfile, filename) == -1) { if (rename(tempfile, filename) == -1) {
@ -377,13 +376,13 @@ xbps_fetch_delta(struct xbps_handle *xhp, const char *basefile, const char *uri,
fetch_delta_fallback: fetch_delta_fallback:
rv = xbps_fetch_file_dest(xhp, uri, filename, flags); rv = xbps_fetch_file_dest(xhp, uri, filename, flags);
fetch_delta_out: fetch_delta_out:
if(tempfile != NULL) if (tempfile != NULL)
free(tempfile); free(tempfile);
if(dname != NULL) if (dname != NULL)
free(dname); free(dname);
if(durl != NULL) if (durl != NULL)
free(durl); free(durl);
if(basehash != NULL) if (basehash != NULL)
free(basehash); free(basehash);
return rv; return rv;