Skip to content

Commit

Permalink
draft/test: introduce some codding style errors to test new approach
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Tikhomirov <[email protected]>
  • Loading branch information
Snorch committed Aug 29, 2023
1 parent 8f51770 commit 09980dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions criu/mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 98 in criu/mount.c

View workflow job for this annotation

GitHub Actions / build

clang-format: Possible coding style problem ([coding-style](https://github.com/checkpoint-restore/criu/blob/criu-dev/CONTRIBUTING.md#edit-the-source-code))
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;
Expand Down Expand Up @@ -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){

Check warning on line 147 in criu/mount.c

View workflow job for this annotation

GitHub Actions / build

clang-format: Possible coding style problem ([coding-style](https://github.com/checkpoint-restore/criu/blob/criu-dev/CONTRIBUTING.md#edit-the-source-code))
struct stat f_stat;
int ret_stat;

Expand Down
6 changes: 3 additions & 3 deletions criu/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 66 in criu/util.c

View workflow job for this annotation

GitHub Actions / build

clang-format: Possible coding style problem ([coding-style](https://github.com/checkpoint-restore/criu/blob/criu-dev/CONTRIBUTING.md#edit-the-source-code))
if ((errno == ERANGE && (nr == LONG_MAX || nr == LONG_MIN)) || (errno != 0 && nr == 0)) {
pr_perror("failed to convert string '%s'", string);
return -EINVAL;
Expand Down Expand Up @@ -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;

Check warning on line 2149 in criu/util.c

View workflow job for this annotation

GitHub Actions / build

clang-format: Possible coding style problem ([coding-style](https://github.com/checkpoint-restore/criu/blob/criu-dev/CONTRIBUTING.md#edit-the-source-code))
struct __user_cap_data_struct cap_data[_LINUX_CAPABILITY_U32S_3];
int i;

cap_header.version = _LINUX_CAPABILITY_VERSION_3;
Expand Down

0 comments on commit 09980dc

Please sign in to comment.