mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Use size_t for get_ps_title() length parameter
This commit is contained in:
parent
b468d6fb54
commit
9a7d37ac66
@ -46,7 +46,7 @@ PHP_FUNCTION(cli_set_process_title)
|
||||
/* {{{ Return a string with the current process title. NULL if error. */
|
||||
PHP_FUNCTION(cli_get_process_title)
|
||||
{
|
||||
int length = 0;
|
||||
size_t length = 0;
|
||||
const char* title = NULL;
|
||||
int rc;
|
||||
|
||||
|
@ -395,7 +395,7 @@ int set_ps_title(const char* title)
|
||||
* length into *displen.
|
||||
* The return code indicates the error.
|
||||
*/
|
||||
int get_ps_title(int *displen, const char** string)
|
||||
int get_ps_title(size_t *displen, const char** string)
|
||||
{
|
||||
int rc = is_ps_title_available();
|
||||
if (rc != PS_TITLE_SUCCESS)
|
||||
@ -421,7 +421,7 @@ int get_ps_title(int *displen, const char** string)
|
||||
free(tmp);
|
||||
}
|
||||
#endif
|
||||
*displen = (int)ps_buffer_cur_len;
|
||||
*displen = ps_buffer_cur_len;
|
||||
*string = ps_buffer;
|
||||
return PS_TITLE_SUCCESS;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ extern char** save_ps_args(int argc, char** argv);
|
||||
|
||||
extern int set_ps_title(const char* new_str);
|
||||
|
||||
extern int get_ps_title(int* displen, const char** string);
|
||||
extern int get_ps_title(size_t* displen, const char** string);
|
||||
|
||||
extern const char* ps_title_errno(int rc);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user