Add parenthesis to turn off some cppcheck warnings (code style)
This commit is contained in:
parent
35ddcde355
commit
ff35213e53
2 changed files with 10 additions and 10 deletions
18
src/dir.c
18
src/dir.c
|
@ -107,15 +107,15 @@ static char ftypelet (unsigned int bits)
|
|||
void mode_string (const unsigned int mode, char *str)
|
||||
{
|
||||
str[0] = ftypelet(mode);
|
||||
str[1] = mode & LINUX_S_IRUSR ? 'r' : '-';
|
||||
str[2] = mode & LINUX_S_IWUSR ? 'w' : '-';
|
||||
str[3] = mode & LINUX_S_IXUSR ? 'x' : '-';
|
||||
str[4] = mode & LINUX_S_IRGRP ? 'r' : '-';
|
||||
str[5] = mode & LINUX_S_IWGRP ? 'w' : '-';
|
||||
str[6] = mode & LINUX_S_IXGRP ? 'x' : '-';
|
||||
str[7] = mode & LINUX_S_IROTH ? 'r' : '-';
|
||||
str[8] = mode & LINUX_S_IWOTH ? 'w' : '-';
|
||||
str[9] = mode & LINUX_S_IXOTH ? 'x' : '-';
|
||||
str[1] = (mode & LINUX_S_IRUSR) ? 'r' : '-';
|
||||
str[2] = (mode & LINUX_S_IWUSR) ? 'w' : '-';
|
||||
str[3] = (mode & LINUX_S_IXUSR) ? 'x' : '-';
|
||||
str[4] = (mode & LINUX_S_IRGRP) ? 'r' : '-';
|
||||
str[5] = (mode & LINUX_S_IWGRP) ? 'w' : '-';
|
||||
str[6] = (mode & LINUX_S_IXGRP) ? 'x' : '-';
|
||||
str[7] = (mode & LINUX_S_IROTH) ? 'r' : '-';
|
||||
str[8] = (mode & LINUX_S_IWOTH) ? 'w' : '-';
|
||||
str[9] = (mode & LINUX_S_IXOTH) ? 'x' : '-';
|
||||
str[10]='\0';
|
||||
#ifdef LINUX_S_ISUID
|
||||
if (mode & LINUX_S_ISUID)
|
||||
|
|
|
@ -270,7 +270,7 @@ disk_t *fewf_init(const char *device, const int mode)
|
|||
disk->description=fewf_description;
|
||||
disk->description_short=fewf_description_short;
|
||||
disk->pread=fewf_pread;
|
||||
disk->pwrite=(data->mode&TESTDISK_O_RDWR?fewf_pwrite:fewf_nopwrite);
|
||||
disk->pwrite=((data->mode&TESTDISK_O_RDWR)?fewf_pwrite:fewf_nopwrite);
|
||||
disk->sync=fewf_sync;
|
||||
disk->access_mode=(data->mode&TESTDISK_O_RDWR);
|
||||
disk->clean=fewf_clean;
|
||||
|
|
Loading…
Reference in a new issue