[PATCH 03/11] (do_input, input_one): remove unused parameter

Jim Meyering jim at meyering.net
Wed Oct 5 20:01:59 UTC 2011


From: Jim Meyering <meyering at redhat.com>

---
 t/poke.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/t/poke.c b/t/poke.c
index 916080e..f3ccd6a 100644
--- a/t/poke.c
+++ b/t/poke.c
@@ -65,9 +65,9 @@ struct get_ctx {

 #define CSUM_INIT  0xFFFFFFFF

-static void do_input(struct params *par, struct hstor_client *httpstor, char *errbuf);
+static void do_input(struct params *par, struct hstor_client *httpstor);
 static void input_one(struct params *par, struct hstor_client *httpstor,
-    char *errbuf, const char *key, FILE *f, const char *filename);
+    const char *key, FILE *f, const char *filename);
 static void do_output(struct params *par, struct hstor_client *httpstor,
 		      const char *errbuf);
 static void output_dir(struct params *par, struct hstor_client *httpstor,
@@ -115,12 +115,13 @@ int main(int argc, char **argv)
 	strcpy(errbuf, "HAXX SCREWUP, USE -v");
 	rc = curl_easy_setopt(httpstor->curl, CURLOPT_ERRORBUFFER, errbuf);
 	if (rc) {
-		fprintf(stderr, "curl_easy_setopt(CURLOPT_ERRORBUFFER): %d\n", rc);
+		fprintf(stderr, "curl_easy_setopt(CURLOPT_ERRORBUFFER): %d\n",
+			rc);
 	}

 	switch (pars.mode) {
 	case MODE_IN:
-		do_input(&pars, httpstor, errbuf);
+		do_input(&pars, httpstor);
 		break;
 	case MODE_OUT:
 		do_output(&pars, httpstor, errbuf);
@@ -140,7 +141,7 @@ int main(int argc, char **argv)
 	return 0;
 }

-static void do_input(struct params *par, struct hstor_client *httpstor, char *errbuf)
+static void do_input(struct params *par, struct hstor_client *httpstor)
 {
 	FILE *f;

@@ -151,15 +152,15 @@ static void do_input(struct params *par, struct hstor_client *httpstor, char *er
 			    par->file, strerror(errno));
 			exit(1);
 		}
-		input_one(par, httpstor, errbuf, par->key, f, par->file);
+		input_one(par, httpstor, par->key, f, par->file);
 		fclose(f);
 	} else {
-		input_one(par, httpstor, errbuf, par->key, stdout, "-");
+		input_one(par, httpstor, par->key, stdout, "-");
 	}
 }

 static void input_one(struct params *par, struct hstor_client *httpstor,
-    char *errbuf, const char *key, FILE *f, const char *filename)
+    const char *key, FILE *f, const char *filename)
 {
 	struct get_ctx getctx;

-- 
1.7.7.rc0.362.g5a14



More information about the iwhd-devel mailing list