[PATCH] janitor: use char arrays for strings
authorRandy Dunlap <rddunlap@osdl.org>
Fri, 1 Aug 2003 08:01:57 +0000 (01:01 -0700)
committerGreg Kroah-Hartman <greg@kroah.com>
Fri, 1 Aug 2003 08:01:57 +0000 (01:01 -0700)
From: maximilian attems <janitor@sternwelten.at>

Use char arrays instead of char* for strings:
 a. uses a single variable instead of two.
 b. shorter code.
 c. __initdata will be completely dropped.

fs/ntfs/super.c
fs/reiserfs/procfs.c
usr/gen_init_cpio.c

index aaa7ec0..83ef51d 100644 (file)
@@ -1670,10 +1670,10 @@ static struct file_system_type ntfs_fs_type = {
 };
 
 /* Stable names for the slab caches. */
-static const char *ntfs_attr_ctx_cache_name = "ntfs_attr_ctx_cache";
-static const char *ntfs_name_cache_name = "ntfs_name_cache";
-static const char *ntfs_inode_cache_name = "ntfs_inode_cache";
-static const char *ntfs_big_inode_cache_name = "ntfs_big_inode_cache";
+static const char ntfs_attr_ctx_cache_name[] = "ntfs_attr_ctx_cache";
+static const char ntfs_name_cache_name[] = "ntfs_name_cache";
+static const char ntfs_inode_cache_name[] = "ntfs_inode_cache";
+static const char ntfs_big_inode_cache_name[] = "ntfs_big_inode_cache";
 
 static int __init init_ntfs_fs(void)
 {
index 1789f8b..073cafd 100644 (file)
@@ -574,7 +574,7 @@ int reiserfs_journal_in_proc( char *buffer, char **start, off_t offset,
 
 
 static struct proc_dir_entry *proc_info_root = NULL;
-static const char *proc_info_root_name = "fs/reiserfs";
+static const char proc_info_root_name[] = "fs/reiserfs";
 
 int reiserfs_proc_info_init( struct super_block *sb )
 {
index 361dc0e..8a0340d 100644 (file)
@@ -53,7 +53,7 @@ static void push_hdr(const char *s)
 static void cpio_trailer(void)
 {
        char s[256];
-       const char *name = "TRAILER!!!";
+       const char name[] = "TRAILER!!!";
 
        sprintf(s, "%s%08X%08X%08lX%08lX%08X%08lX"
               "%08X%08X%08X%08X%08X%08ZX%08X",