Code review comment for lp:~sergei.glushchenko/percona-xtrabackup/xb20-bug932623

Revision history for this message
Alexey Kopytov (akopytov) wrote :

Forgot to mention that the following code can be simplified:

14 if (fscanf(fp, "page_size = %lu\n", &info->page_size) != 1)
15 r= FALSE;
16 + if (!r || fscanf(fp, "space_id = %lu\n", &info->space_id) != 1)
17 + r= FALSE;

and

31 snprintf(buf, sizeof(buf), "page_size = %lu\n", info->page_size);
32 -
33 len = strlen(buf);
34 +
35 + snprintf(buf + len, sizeof(buf) - len, "space_id = %lu\n", info->space_id);
36 + len += strlen(buf + len);
37 +

« Back to merge proposal