diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2014-12-03 14:51:16 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2014-12-08 19:26:39 +0200 |
commit | 8032f526ef1d075e303342b7741db35faadfd00f (patch) | |
tree | 95ddfbf5e2cf7d471e48d8616ca64550400abeac /tests/drv_hangman.c | |
parent | e1bdab9973ffdb5477666a384b011fa012965758 (diff) |
tests: Run lib/igt.cocci
Found some open coded min()/max()/swap() macros.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tests/drv_hangman.c')
-rw-r--r-- | tests/drv_hangman.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c index cdbded2f..ec28c9d8 100644 --- a/tests/drv_hangman.c +++ b/tests/drv_hangman.c @@ -33,6 +33,7 @@ #include "intel_chipset.h" #include "drmtest.h" +#include "igt_aux.h" #include "igt_debugfs.h" #include "ioctl_wrappers.h" @@ -117,8 +118,7 @@ static void read_dfs(const char *fname, char *d, int maxlen) static void _assert_dfs_entry(const char *fname, const char *s, bool inverse) { char tmp[1024]; - const int l = strlen(s) < sizeof(tmp) ? - strlen(s) : sizeof(tmp); + const int l = min(strlen(s), sizeof(tmp)); read_dfs(fname, tmp, l + 1); if (!inverse) { |