mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
lint: prohibit to use %m specifier in pr_* functions
As our pr_* functions are complex and can call different system calls inside before actual printing (e.g. gettimeofday for timestamps) actual errno at the time of printing may be changed. Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
parent
b7e5910691
commit
f684c74fca
1 changed files with 1 additions and 1 deletions
2
Makefile
2
Makefile
|
|
@ -441,7 +441,7 @@ lint:
|
|||
# Do not append \n to pr_perror or fail
|
||||
! git --no-pager grep -E '^\s*\<(pr_perror|fail)\>.*\\n"'
|
||||
# Do not use %m with pr_perror or fail
|
||||
! git --no-pager grep -E '^\s*\<(pr_perror|fail)\>.*%m'
|
||||
! git --no-pager grep -E '^\s*\<(pr_(err|perror|warn|debug|info|msg)|fail)\>.*%m'
|
||||
# Do not use errno with pr_perror or fail
|
||||
! git --no-pager grep -E '^\s*\<(pr_perror|fail)\>\(".*".*errno'
|
||||
# End pr_(err|warn|msg|info|debug) with \n
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue