diff options
author | 2016-12-03 12:34:35 +0000 | |
---|---|---|
committer | 2016-12-03 12:34:35 +0000 | |
commit | bc99fb9a541640cc76264c31e90a0409d164801e (patch) | |
tree | ba7452e2ddfaf3296054d612e7cd1551efe57268 /lib/libssl/bs_ber.c | |
parent | Add Copyright and license. (diff) | |
download | wireguard-openbsd-bc99fb9a541640cc76264c31e90a0409d164801e.tar.xz wireguard-openbsd-bc99fb9a541640cc76264c31e90a0409d164801e.zip |
Avoid signed vs unsigned warnings from clang by adding two casts,
slightly rewriting some code and changing the type of an array.
ok bcook@ doug@
Diffstat (limited to 'lib/libssl/bs_ber.c')
-rw-r--r-- | lib/libssl/bs_ber.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libssl/bs_ber.c b/lib/libssl/bs_ber.c index 6e945a02466..7863b8be0cd 100644 --- a/lib/libssl/bs_ber.c +++ b/lib/libssl/bs_ber.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bs_ber.c,v 1.8 2015/06/21 16:10:45 doug Exp $ */ +/* $OpenBSD: bs_ber.c,v 1.9 2016/12/03 12:34:35 jsing Exp $ */ /* * Copyright (c) 2014, Google Inc. * @@ -103,7 +103,9 @@ is_primitive_type(unsigned int tag) static char is_eoc(size_t header_len, CBS *contents) { - return header_len == 2 && CBS_mem_equal(contents, "\x00\x00", 2); + const unsigned char eoc[] = {0x0, 0x0}; + + return header_len == 2 && CBS_mem_equal(contents, eoc, 2); } /* |