[CRIU] [PATCH 1/3] remote: Fix code indentation

Pavel Tikhomirov snorcht at gmail.com
Tue Feb 5 16:58:22 MSK 2019


вт, 29 янв. 2019 г. в 20:38, Radostin Stoyanov <rstoyanov1 at gmail.com>:
...

> @@ -1014,9 +999,9 @@ int read_remote_image_connection(char *snapshot_id,
> char *path)
>                                 path, snapshot_id);
>                 return -1;
>         }
> -       if (!error || !strncmp(path, RESTORE_FINISH,
> sizeof(RESTORE_FINISH)))
> +       if (!error || !strncmp(path, RESTORE_FINISH,
> sizeof(RESTORE_FINISH))) {
>                 return sockfd;
> -       else if (error == ENOENT) {
> +       } else if (error == ENOENT) {
>                 pr_info("Image does not exist (%s:%s)\n", path,
> snapshot_id);
>                 close(sockfd);
>                 return -ENOENT;


Is these hunk really an indentation fix? we have many places of:

if (condition1)
        action1;
else if (condition2) {
        action2;
        action3;
}

[snorch at snorch criu]$ git log --oneline | head -n1
109432a3d c-lib: strdup for service_address and service_binary
[snorch at snorch criu]$ git grep "^[^}]*else if.* {$" | wc -l
23
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20190205/0a70d98d/attachment.html>


More information about the CRIU mailing list