|
From: <fi...@li...> - 2015-01-27 15:05:47
|
This patch refactors copyFile so that it doesn't close sfdp and tfdp, since
copyFile didn't open those files. Also, the caller to copyFile closes these
files. This patch also adds descriptions of copyFile parameters.
Signed-off-by: Fionnuala Gunter <fi...@li...>
---
sign/rpmgensig.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sign/rpmgensig.c b/sign/rpmgensig.c
index 0bd14e3..983a2f7 100644
--- a/sign/rpmgensig.c
+++ b/sign/rpmgensig.c
@@ -88,6 +88,10 @@ static int manageFile(FD_t *fdp, const char *fn, int flags)
/**
* Copy header+payload, calculating digest(s) on the fly.
+ * @param sfdp source file
+ * @param sfnp source path
+ * @param tfdp destination file
+ * @param tfnp destination path
*/
static int copyFile(FD_t *sfdp, const char *sfnp,
FD_t *tfdp, const char *tfnp)
@@ -121,8 +125,6 @@ static int copyFile(FD_t *sfdp, const char *sfnp,
rc = 0;
exit:
- if (*sfdp) (void) closeFile(sfdp);
- if (*tfdp) (void) closeFile(tfdp);
return rc;
}
--
2.1.0
|