Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define stat64_to_stat(buf64, buf) \
- buf->st_dev = (buf64)->st_dev; \
- buf->st_ino = (buf64)->st_ino; \
- buf->st_mode = (buf64)->st_mode; \
- buf->st_nlink = (buf64)->st_nlink; \
- buf->st_uid = (buf64)->st_uid; \
- buf->st_gid = (buf64)->st_gid; \
- buf->st_rdev = (buf64)->st_rdev; \
- buf->st_size = (_off_t)(buf64)->st_size; \
- buf->st_atime = (time_t)(buf64)->st_atime; \
- buf->st_mtime = (time_t)(buf64)->st_mtime; \
- buf->st_ctime = (time_t)(buf64)->st_ctime; \
- int CDECL _tstat(const _TCHAR* path, struct _stat * buf)
- {
- int ret;
- struct __stat64 buf64;
- ret = _tstat64(path, &buf64);
- if (!ret)
- stat64_to_stat(&buf64, buf);
- return ret;
- }
- This suspicious code was found in ReactOS project by PVS-Studio static code analyzer.
- Warning message is:
- V640 The code's operational logic does not correspond with its formatting. The second statement will always be executed. It is possible that curly brackets are missing. stat.c 24
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment