aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-02-18 11:28:07 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2017-02-18 10:28:07 -0600
commit127e862029298c2ee0e5243c3abe4df26d863372 (patch)
tree4a54a51bdef1a452afd983438f879da6a60ce846 /src
parent8aa893b3c3739c95f80c22c46e344b9e9226b3ab (diff)
downloadcryptography-127e862029298c2ee0e5243c3abe4df26d863372.tar.gz
cryptography-127e862029298c2ee0e5243c3abe4df26d863372.tar.bz2
cryptography-127e862029298c2ee0e5243c3abe4df26d863372.zip
use official API for unreachable C code (#3404)
Diffstat (limited to 'src')
-rw-r--r--src/_cffi_src/openssl/src/osrandom_engine.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/_cffi_src/openssl/src/osrandom_engine.c b/src/_cffi_src/openssl/src/osrandom_engine.c
index 52f55af8..f1cfcb67 100644
--- a/src/_cffi_src/openssl/src/osrandom_engine.c
+++ b/src/_cffi_src/openssl/src/osrandom_engine.c
@@ -335,7 +335,7 @@ static int osrandom_rand_bytes(unsigned char *buffer, int size) {
}
return 1;
}
- return 0; /* unreachable */
+ __builtin_unreachable();
}
static int osrandom_finish(ENGINE *e) {
@@ -354,7 +354,7 @@ static int osrandom_rand_status(void) {
case CRYPTOGRAPHY_OSRANDOM_GETRANDOM_WORKS:
return 1;
}
- return 0; /* unreachable */
+ __builtin_unreachable();
}
static const char *osurandom_get_implementation(void) {
@@ -368,7 +368,7 @@ static const char *osurandom_get_implementation(void) {
case CRYPTOGRAPHY_OSRANDOM_GETRANDOM_WORKS:
return "getrandom";
}
- return "<invalid>"; /* unreachable */
+ __builtin_unreachable();
}
#endif /* CRYPTOGRAPHY_OSRANDOM_ENGINE_GETRANDOM */