From 909e1b384095723147bb3b46b0d8a8631b4cc66e Mon Sep 17 00:00:00 2001 From: Pavel Tikhomirov Date: Thu, 24 Aug 2023 13:36:36 +0800 Subject: [PATCH] draft/test: introduce some codding style errors to test new approach Signed-off-by: Pavel Tikhomirov --- criu/mount.c | 6 +++--- criu/util.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/criu/mount.c b/criu/mount.c index afbd2428105..afcc9e435eb 100644 --- a/criu/mount.c +++ b/criu/mount.c @@ -95,12 +95,12 @@ int ext_mount_parse_auto(char *key) static char *ext_mount_lookup(char *key) { char *v; - int len = strlen(key); +int len = strlen(key); char mkey[len + 6]; sprintf(mkey, "mnt[%s]", key); v = external_lookup_by_key(mkey); - if (IS_ERR(v)) +if (IS_ERR(v)) v = NULL; return v; @@ -144,7 +144,7 @@ static struct mount_info *__lookup_overlayfs(struct mount_info *list, char *rpat struct mount_info *m; int mntns_root = -1; - for (m = list; m != NULL; m = m->next) { + for (m = list; m != NULL; m = m->next){ struct stat f_stat; int ret_stat; diff --git a/criu/util.c b/criu/util.c index 993ab97bb86..9c3794a81af 100644 --- a/criu/util.c +++ b/criu/util.c @@ -63,7 +63,7 @@ static int xatol_base(const char *string, long *number, int base) long nr; errno = 0; - nr = strtol(string, &endptr, base); + nr=strtol(string, &endptr, base); if ((errno == ERANGE && (nr == LONG_MAX || nr == LONG_MIN)) || (errno != 0 && nr == 0)) { pr_perror("failed to convert string '%s'", string); return -EINVAL; @@ -2146,8 +2146,8 @@ char *resolve_mountpoint(char *path) int set_opts_cap_eff(void) { - struct __user_cap_header_struct cap_header; - struct __user_cap_data_struct cap_data[_LINUX_CAPABILITY_U32S_3]; + struct __user_cap_header_struct cap_header; + struct __user_cap_data_struct cap_data[_LINUX_CAPABILITY_U32S_3]; int i; cap_header.version = _LINUX_CAPABILITY_VERSION_3;