Re: [PATCH 4/7] iscsi-target: Make a variable initialisation a bit more obvious in iscsi_create_default_params()

From: SF Markus Elfring
Date: Sat Dec 12 2015 - 10:02:27 EST


>> @@ -200,9 +200,8 @@ free_param:
>> int iscsi_create_default_params(struct iscsi_param_list **param_list_ptr)
>> {
>> struct iscsi_param *param;
>> - struct iscsi_param_list *pl;
>> + struct iscsi_param_list *pl = kzalloc(sizeof(*pl), GFP_KERNEL);
>>
>> - pl = kzalloc(sizeof(struct iscsi_param_list), GFP_KERNEL);
>
> I don't see the benefit of this change, and the pattern assignment ->
> failure test becomes more obscure.

Are there any more software developers who prefer to specify
such a variable initialisation on a single line?

Does the proposed small source code reduction matter for you?

Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/