[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH 1/2] New API: vfs_min_size





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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]