diff options
author | Daniel Black <daniel.black@au.ibm.com> | 2017-07-02 17:02:03 +1000 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-07-15 08:44:14 +0200 |
commit | ec4e39558ee33da4e10fb1afc6702f325e6aec30 (patch) | |
tree | 0cf3946f2a7a2542165c692efeb895c86bf44e59 | |
parent | 0375f2e2730c6e30f3e6f171c9b73d8553a3ae9a (diff) | |
download | mariadb-git-ec4e39558ee33da4e10fb1afc6702f325e6aec30.tar.gz |
ma_recovery: unintentional order of operations
Coverity report this as:
CID 971840 (#1 of 1): Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
result_independent_of_operands: 4 | (flags & 1) is always true regardless of the values of its operands. This occurs as the logical first operand of "?:".
The C order of precidence has | of higher precidence than ?:. The
intenting implies an | of the 3 terms.
Adjust to intented meaning.
-rw-r--r-- | storage/maria/ma_recovery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/maria/ma_recovery.c b/storage/maria/ma_recovery.c index 5e42ebc8d5d..618e6381f27 100644 --- a/storage/maria/ma_recovery.c +++ b/storage/maria/ma_recovery.c @@ -888,7 +888,7 @@ prototype_redo_exec_hook(REDO_CREATE_TABLE) goto end; fn_format(filename, name, "", MARIA_NAME_IEXT, (MY_UNPACK_FILENAME | - (flags & HA_DONT_TOUCH_DATA) ? MY_RETURN_REAL_PATH : 0) | + ((flags & HA_DONT_TOUCH_DATA) ? MY_RETURN_REAL_PATH : 0)) | MY_APPEND_EXT); linkname_ptr= NULL; create_flag= MY_DELETE_OLD; |