Skip to content

Commit 0ee72d0

Browse files
committed
sapi: use bool type for post_read global
1 parent c852fce commit 0ee72d0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

main/SAPI.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ SAPI_API size_t sapi_read_post_block(char *buffer, size_t buflen)
217217
}
218218
if (read_bytes < buflen) {
219219
/* done */
220-
SG(post_read) = 1;
220+
SG(post_read) = true;
221221
}
222222

223223
return read_bytes;
@@ -418,7 +418,7 @@ SAPI_API void sapi_activate(void)
418418
SG(request_info).post_entry = NULL;
419419
SG(request_info).proto_num = 1000; /* Default to HTTP 1.0 */
420420
SG(global_request_time) = 0;
421-
SG(post_read) = 0;
421+
SG(post_read) = false;
422422
SG(send_header_fcc) = empty_fcall_info_cache;
423423
/* It's possible to override this general case in the activate() callback, if necessary. */
424424
if (SG(request_info).request_method && !strcmp(SG(request_info).request_method, "HEAD")) {

main/SAPI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ typedef struct _sapi_globals_struct {
132132
sapi_request_info request_info;
133133
sapi_headers_struct sapi_headers;
134134
int64_t read_post_bytes;
135-
unsigned char post_read;
135+
bool post_read;
136136
unsigned char headers_sent;
137137
zend_stat_t global_stat;
138138
char *default_mimetype;

0 commit comments

Comments
 (0)