Fixed the code style in *.c files to two spaces indentation and add a linter named funstx to Fun. (0.39.0)
This commit is contained in:
parent
33001a7ad2
commit
03b2532474
237 changed files with 17550 additions and 13911 deletions
|
|
@ -13,15 +13,21 @@
|
|||
* OpenSSL SHA-256 builtin
|
||||
*/
|
||||
case OP_OPENSSL_SHA256: {
|
||||
Value vdata = pop_value(vm);
|
||||
char *s = value_to_string_alloc(&vdata);
|
||||
free_value(vdata);
|
||||
if (!s) { push_value(vm, make_string("")); break; }
|
||||
char *hex = fun_openssl_sha256_hex((const unsigned char*)s, strlen(s));
|
||||
free(s);
|
||||
if (!hex) { push_value(vm, make_string("")); break; }
|
||||
Value out = make_string(hex);
|
||||
free(hex);
|
||||
push_value(vm, out);
|
||||
Value vdata = pop_value(vm);
|
||||
char *s = value_to_string_alloc(&vdata);
|
||||
free_value(vdata);
|
||||
if (!s) {
|
||||
push_value(vm, make_string(""));
|
||||
break;
|
||||
}
|
||||
char *hex = fun_openssl_sha256_hex((const unsigned char *)s, strlen(s));
|
||||
free(s);
|
||||
if (!hex) {
|
||||
push_value(vm, make_string(""));
|
||||
break;
|
||||
}
|
||||
Value out = make_string(hex);
|
||||
free(hex);
|
||||
push_value(vm, out);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue