The local variable @object etc. in btrfs-property get/set functions
are to be checked whether to be NULL or not, but the @parse_args()
don't guarantee to assign a value to it, so it is better to init
it to NULL.
Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
static int cmd_get(int argc, char **argv)
{
int ret;
- char *object;
+ char *object = NULL;
char *name = NULL;
int types = 0;
static int cmd_set(int argc, char **argv)
{
int ret;
- char *object;
- char *name;
- char *value;
+ char *object = NULL;
+ char *name = NULL;
+ char *value = NULL;
int types = 0;
if (check_argc_min(argc, 4) || check_argc_max(argc, 6))