Skip to content

Commit d977a7e

Browse files
committed
Add result code to zend_add_system_entropy
1 parent 0921109 commit d977a7e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Zend/zend_system_id.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,17 @@ ZEND_API char zend_system_id[32];
2626
static PHP_MD5_CTX context;
2727
static int finalized = 0;
2828

29-
ZEND_API void zend_add_system_entropy(const char *module_name, const char *hook_name, const void *data, size_t size)
29+
ZEND_API ZEND_RESULT_CODE zend_add_system_entropy(const char *module_name, const char *hook_name, const void *data, size_t size)
3030
{
3131
if (finalized == 0) {
3232
PHP_MD5Update(&context, module_name, strlen(module_name));
3333
PHP_MD5Update(&context, hook_name, strlen(hook_name));
3434
if (size) {
3535
PHP_MD5Update(&context, data, size);
3636
}
37+
return SUCCESS;
3738
}
39+
return FAILURE;
3840
}
3941

4042
#define ZEND_BIN_ID "BIN_" ZEND_TOSTR(SIZEOF_INT) ZEND_TOSTR(SIZEOF_LONG) ZEND_TOSTR(SIZEOF_SIZE_T) ZEND_TOSTR(SIZEOF_ZEND_LONG) ZEND_TOSTR(ZEND_MM_ALIGNMENT)

Zend/zend_system_id.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ BEGIN_EXTERN_C()
2121
/* True global; Write-only during MINIT/startup */
2222
extern ZEND_API char zend_system_id[32];
2323

24-
ZEND_API void zend_add_system_entropy(const char *module_name, const char *hook_name, const void *data, size_t size);
24+
ZEND_API ZEND_RESULT_CODE zend_add_system_entropy(const char *module_name, const char *hook_name, const void *data, size_t size);
2525
END_EXTERN_C()
2626

2727
void zend_startup_system_id(void);

0 commit comments

Comments
 (0)