[packages/ifenslave] Fix build with -Werror=format-security

megabajt megabajt at pld-linux.org
Tue Feb 5 20:45:06 CET 2013


commit bfa05ceda68bc52e0859b7a41c3104e3e41f3319
Author: Marcin Banasiak <marcin.banasiak at gmail.com>
Date:   Tue Feb 5 20:44:29 2013 +0100

    Fix build with -Werror=format-security

 ifenslave.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/ifenslave.c b/ifenslave.c
index f315d20..36f92f1 100644
--- a/ifenslave.c
+++ b/ifenslave.c
@@ -260,7 +260,7 @@ int main(int argc, char *argv[])
 		case 'V': opt_V++; exclusive++; break;
 
 		case '?':
-			fprintf(stderr, usage_msg);
+			fputs(usage_msg, stderr);
 			res = 2;
 			goto out;
 		}
@@ -268,13 +268,13 @@ int main(int argc, char *argv[])
 
 	/* options check */
 	if (exclusive > 1) {
-		fprintf(stderr, usage_msg);
+		fputs(usage_msg, stderr);
 		res = 2;
 		goto out;
 	}
 
 	if (opt_v || opt_V) {
-		printf(version);
+		fputs(version, stdout);
 		if (opt_V) {
 			res = 0;
 			goto out;
@@ -282,14 +282,14 @@ int main(int argc, char *argv[])
 	}
 
 	if (opt_u) {
-		printf(usage_msg);
+		fputs(usage_msg, stdout);
 		res = 0;
 		goto out;
 	}
 
 	if (opt_h) {
-		printf(usage_msg);
-		printf(help_msg);
+		fputs(usage_msg, stdout);
+		fputs(help_msg, stdout);
 		res = 0;
 		goto out;
 	}
@@ -309,7 +309,7 @@ int main(int argc, char *argv[])
 			goto out;
 		} else {
 			/* Just show usage */
-			fprintf(stderr, usage_msg);
+			fputs(usage_msg, stderr);
 			res = 2;
 			goto out;
 		}
@@ -320,7 +320,7 @@ int main(int argc, char *argv[])
 	master_ifname = *spp++;
 
 	if (master_ifname == NULL) {
-		fprintf(stderr, usage_msg);
+		fputs(usage_msg, stderr);
 		res = 2;
 		goto out;
 	}
@@ -339,7 +339,7 @@ int main(int argc, char *argv[])
 
 	if (slave_ifname == NULL) {
 		if (opt_d || opt_c) {
-			fprintf(stderr, usage_msg);
+			fputs(usage_msg, stderr);
 			res = 2;
 			goto out;
 		}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ifenslave.git/commitdiff/bfa05ceda68bc52e0859b7a41c3104e3e41f3319



More information about the pld-cvs-commit mailing list