Zend: Voidify virtual_cwd_(de)activate() (#15554)

It always returned 0
This commit is contained in:
Gina Peter Banyard 2024-08-23 15:28:37 +01:00 committed by GitHub
parent 8fcf34d598
commit d9695401e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 6 deletions

View File

@ -230,22 +230,20 @@ CWD_API void virtual_cwd_shutdown(void) /* {{{ */
}
/* }}} */
CWD_API int virtual_cwd_activate(void) /* {{{ */
CWD_API void virtual_cwd_activate(void) /* {{{ */
{
if (CWDG(cwd).cwd == NULL) {
CWD_STATE_COPY(&CWDG(cwd), &main_cwd_state);
}
return 0;
}
/* }}} */
CWD_API int virtual_cwd_deactivate(void) /* {{{ */
CWD_API void virtual_cwd_deactivate(void) /* {{{ */
{
if (CWDG(cwd).cwd != NULL) {
CWD_STATE_FREE(&CWDG(cwd));
CWDG(cwd).cwd = NULL;
}
return 0;
}
/* }}} */

View File

@ -168,8 +168,8 @@ typedef int (*verify_path_func)(const cwd_state *);
CWD_API void virtual_cwd_startup(void);
CWD_API void virtual_cwd_shutdown(void);
CWD_API int virtual_cwd_activate(void);
CWD_API int virtual_cwd_deactivate(void);
CWD_API void virtual_cwd_activate(void);
CWD_API void virtual_cwd_deactivate(void);
CWD_API char *virtual_getcwd_ex(size_t *length);
CWD_API char *virtual_getcwd(char *buf, size_t size);
CWD_API zend_result virtual_chdir(const char *path);