Comparison

util-src/crand.c @ 7918:12e5a54907b6

util.crand: Clarify that lua_error does not return
author Kim Alvefur <zash@zash.se>
date Sat, 25 Feb 2017 18:12:24 +0100
parent 7915:e3d3ebd417f4
child 7931:b619b85e01aa
comparison
equal deleted inserted replaced
7917:1ea3a8dc7dd5 7918:12e5a54907b6
67 arc4random_buf(buf, len); 67 arc4random_buf(buf, len);
68 ret = len; 68 ret = len;
69 #elif defined(WITH_OPENSSL) 69 #elif defined(WITH_OPENSSL)
70 if(!RAND_status()) { 70 if(!RAND_status()) {
71 lua_pushliteral(L, "OpenSSL PRNG not seeded"); 71 lua_pushliteral(L, "OpenSSL PRNG not seeded");
72 lua_error(L); 72 return lua_error(L);
73 } 73 }
74 74
75 ret = RAND_bytes(buf, len); 75 ret = RAND_bytes(buf, len);
76 76
77 if(ret == 1) { 77 if(ret == 1) {