[lvm-devel] dev-mornfall-activate - cleanup: simplify

Petr Rockai mornfall at fedoraproject.org
Tue Jun 4 19:26:00 UTC 2013


Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=deb3c93a192c5ea03434ea11d33dff571462edc3
Commit:        deb3c93a192c5ea03434ea11d33dff571462edc3
Parent:        986a50e4a1c017cc655bbcce45ffa4444386678b
Author:        Zdenek Kabelac <zkabelac at redhat.com>
AuthorDate:    Mon Apr 29 12:33:38 2013 +0200
Committer:     Zdenek Kabelac <zkabelac at redhat.com>
CommitterDate: Fri May 3 15:44:14 2013 +0200

cleanup: simplify

Use simplier sprintf.
---
 tools/reporter.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/tools/reporter.c b/tools/reporter.c
index 3db8b83..2744fcd 100644
--- a/tools/reporter.c
+++ b/tools/reporter.c
@@ -301,9 +301,7 @@ static int _report(struct cmd_context *cmd, int argc, char **argv,
 				log_error("options string allocation failed");
 				return ECMD_FAILED;
 			}
-			strcpy(str, options);
-			strcat(str, ",");
-			strcat(str, opts + 1);
+			(void) sprintf(str, "%s,%s", options, opts + 1);
 			options = str;
 		} else
 			options = opts;




More information about the lvm-devel mailing list