]> sourceware.org Git - lvm2.git/commitdiff
Fix wrong cast to char*
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 20 Dec 2010 13:28:04 +0000 (13:28 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 20 Dec 2010 13:28:04 +0000 (13:28 +0000)
As cmd->cmd_line is already const char pointer it's not needed to cast already
const char pointer to char pointer.

WHATS_NEW
liblvm/lvm_base.c

index a06565c037213f3f600c1ec867f898d6fbbbb490..f107e41f3a6ce252b2ff4d8a2c3e228bda068539 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.79 -  
 ===================================
+  Fixing const cast gcc warnings in the code.
   Check read() and close() results in _get_cmdline().
   Add const for struct config_node usage.
   Fix NULL pointer check in error path in clvmd do_command(). (2.02.78)
index f8e10046b270a6f9a8f82187980d8cc73d2f1177..9e1a8ecd87241d81085f0428c2354cc26e694338 100644 (file)
@@ -61,7 +61,7 @@ lvm_t lvm_init(const char *system_dir)
         * archive() call.  Possible example:
         * cmd_line = "lvm_vg_create: vg1\nlvm_vg_extend vg1 /dev/sda1\n"
         */
-       cmd->cmd_line = (char *)"liblvm";
+       cmd->cmd_line = "liblvm";
 
        return (lvm_t) cmd;
 }
This page took 0.044919 seconds and 5 git commands to generate.