Commit 47f80ff
committed
Remove unnecessary type punnign from mysqli_api.c
value is a long. On big-endian architectures mysql_stmt_attr_get() will write to
the most significant byte. Type punning was used to move that byte to the least
significant one, which is UB. We can avoid this by simply casting to my_bool
(alias of bool). Previously, a comparison against 0 should've been done.1 parent f60dc47 commit 47f80ff
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1799 | 1799 | | |
1800 | 1800 | | |
1801 | 1801 | | |
1802 | | - | |
1803 | | - | |
| 1802 | + | |
1804 | 1803 | | |
1805 | 1804 | | |
1806 | | - | |
| 1805 | + | |
| 1806 | + | |
1807 | 1807 | | |
1808 | 1808 | | |
1809 | 1809 | | |
| |||
0 commit comments