[Libguestfs] [PATCH 1/2] New API: vfs_min_size
Maxim Perevedentsev
mperevedentsev at virtuozzo.com
Tue Oct 20 09:59:06 UTC 2015
On 10/19/2015 07:45 PM, Pino Toscano wrote:
> On Monday 19 October 2015 17:05:02 Maxim Perevedentsev wrote:
>> +int64_t
>> +ntfs_min_size (const char *device)
>> +{
>> + CLEANUP_FREE char *err = NULL, *out = NULL;
>> + CLEANUP_FREE_STRING_LIST char **lines = NULL;
>> + int r;
>> + size_t i;
>> + char *p;
>> + int64_t ret, volume_size = 0;
> The scope of "ret" could be reduced to only the if below where it is
> used.
Looking through code, I decided that declaring variables in the
beginning of function is part of code style, so I followed it. Should I
also move volume/cluster size declarations to branch where they are used?
--
Your sincerely,
Maxim Perevedentsev
More information about the Libguestfs
mailing list