diff options
author | emersion <contact@emersion.fr> | 2018-07-02 09:06:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-02 09:06:02 +0100 |
commit | defb73596fedec846280b9155bb3e9d210da49bb (patch) | |
tree | 0a3e6c9e5efaf0e8bb5f01ab7691350cd063ebcb /common/unicode.c | |
parent | Merge pull request #2190 from emersion/screencopy (diff) | |
parent | swaylock daemonize: fix leak of devnull fd (diff) | |
download | sway-defb73596fedec846280b9155bb3e9d210da49bb.tar.gz sway-defb73596fedec846280b9155bb3e9d210da49bb.tar.zst sway-defb73596fedec846280b9155bb3e9d210da49bb.zip |
Merge pull request #2186 from martinetd/static-analysis
Static analysis fixes
Diffstat (limited to 'common/unicode.c')
-rw-r--r-- | common/unicode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/unicode.c b/common/unicode.c index 38a9b48e..5070e083 100644 --- a/common/unicode.c +++ b/common/unicode.c | |||
@@ -92,7 +92,7 @@ static const struct { | |||
92 | 92 | ||
93 | int utf8_size(const char *s) { | 93 | int utf8_size(const char *s) { |
94 | uint8_t c = (uint8_t)*s; | 94 | uint8_t c = (uint8_t)*s; |
95 | for (size_t i = 0; i < sizeof(sizes) / 2; ++i) { | 95 | for (size_t i = 0; i < sizeof(sizes) / sizeof(*sizes); ++i) { |
96 | if ((c & sizes[i].mask) == sizes[i].result) { | 96 | if ((c & sizes[i].mask) == sizes[i].result) { |
97 | return sizes[i].octets; | 97 | return sizes[i].octets; |
98 | } | 98 | } |