[lvm-devel] master - cleanup: use static char[] array

Zdenek Kabelac zkabelac at fedoraproject.org
Thu Aug 23 12:42:45 UTC 2012


Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=449c09201030cfb18baf8481430bc150e43f5f07
Commit:        449c09201030cfb18baf8481430bc150e43f5f07
Parent:        90191e6ff2d156abceebafa342ec34274b6bd22a
Author:        Zdenek Kabelac <zkabelac at redhat.com>
AuthorDate:    Tue Aug 21 15:16:32 2012 +0200
Committer:     Zdenek Kabelac <zkabelac at redhat.com>
CommitterDate: Thu Aug 23 14:37:38 2012 +0200

cleanup: use static char[] array

---
 lib/device/device.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/device/device.c b/lib/device/device.c
index 3e5e2a4..a87ae7f 100644
--- a/lib/device/device.c
+++ b/lib/device/device.c
@@ -361,7 +361,7 @@ static unsigned long _dev_topology_attribute(const char *attribute,
 					     const char *sysfs_dir,
 					     struct device *dev)
 {
-	const char *sysfs_fmt_str = "%s/dev/block/%d:%d/%s";
+	static const char sysfs_fmt_str[] = "%s/dev/block/%d:%d/%s";
 	char path[PATH_MAX+1], buffer[64];
 	FILE *fp;
 	struct stat info;




More information about the lvm-devel mailing list