summaryrefslogtreecommitdiff
path: root/src/lib/libssl/bs_ber.c
diff options
context:
space:
mode:
authorjsing <>2016-12-03 12:34:35 +0000
committerjsing <>2016-12-03 12:34:35 +0000
commit578440178487a164eba874e7a566a55de4a9e2e8 (patch)
tree8ef275a8ac5312337c385a03eb510a3b70e33eaa /src/lib/libssl/bs_ber.c
parentd5a54e12564ecf0e373a69d1f6204f8ff522d984 (diff)
downloadopenbsd-578440178487a164eba874e7a566a55de4a9e2e8.tar.gz
openbsd-578440178487a164eba874e7a566a55de4a9e2e8.tar.bz2
openbsd-578440178487a164eba874e7a566a55de4a9e2e8.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 '')
-rw-r--r--src/lib/libssl/bs_ber.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libssl/bs_ber.c b/src/lib/libssl/bs_ber.c
index 6e945a0246..7863b8be0c 100644
--- a/src/lib/libssl/bs_ber.c
+++ b/src/lib/libssl/bs_ber.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bs_ber.c,v 1.8 2015/06/21 16:10:45 doug Exp $ */ 1/* $OpenBSD: bs_ber.c,v 1.9 2016/12/03 12:34:35 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014, Google Inc. 3 * Copyright (c) 2014, Google Inc.
4 * 4 *
@@ -103,7 +103,9 @@ is_primitive_type(unsigned int tag)
103static char 103static char
104is_eoc(size_t header_len, CBS *contents) 104is_eoc(size_t header_len, CBS *contents)
105{ 105{
106 return header_len == 2 && CBS_mem_equal(contents, "\x00\x00", 2); 106 const unsigned char eoc[] = {0x0, 0x0};
107
108 return header_len == 2 && CBS_mem_equal(contents, eoc, 2);
107} 109}
108 110
109/* 111/*