Skip to content

Commit 72a9c6d

Browse files
author
Jani Taskinen
committed
- Sync with HEAD
1 parent 1a64bb9 commit 72a9c6d

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

main/rfc1867.c

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static void register_http_post_files_variable_ex(char *var, zval *val, zval *htt
262262
}
263263
/* }}} */
264264

265-
static int unlink_filename(char **filename TSRMLS_DC) /* {{{ */
265+
static int unlink_filename(char **filename TSRMLS_DC) /* {{{ */
266266
{
267267
VCWD_UNLINK(*filename);
268268
return 0;
@@ -303,7 +303,7 @@ typedef struct {
303303

304304
/*
305305
* Fill up the buffer with client data.
306-
* returns number of bytes added to buffer.
306+
* Returns number of bytes added to buffer.
307307
*/
308308
static int fill_buffer(multipart_buffer *self TSRMLS_DC)
309309
{
@@ -416,7 +416,7 @@ static char *next_line(multipart_buffer *self)
416416
return line;
417417
}
418418

419-
/* returns the next CRLF terminated line from the client */
419+
/* Returns the next CRLF terminated line from the client */
420420
static char *get_line(multipart_buffer *self TSRMLS_DC)
421421
{
422422
char* ptr = next_line(self);
@@ -664,7 +664,7 @@ static char *php_ap_getword_conf(char **line TSRMLS_DC)
664664
* Search for a string in a fixed-length byte string.
665665
* If partial is true, partial matches are allowed at the end of the buffer.
666666
* Returns NULL if not found, or a pointer to the start of the first match.
667-
*/
667+
*/
668668
static void *php_ap_memstr(char *haystack, int haystacklen, char *needle, int needlen, int partial)
669669
{
670670
int len = haystacklen;
@@ -746,12 +746,14 @@ static char *multipart_buffer_read_body(multipart_buffer *self, unsigned int *le
746746
total_bytes += read_bytes;
747747
}
748748

749-
if (out) out[total_bytes] = '\0';
749+
if (out) {
750+
out[total_bytes] = '\0';
751+
}
750752
*len = total_bytes;
751753

752754
return out;
753755
}
754-
/* }}} */
756+
/* }}} */
755757

756758
/*
757759
* The combined READER/HANDLER
@@ -772,7 +774,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
772774
#endif
773775
multipart_buffer *mbuff;
774776
zval *array_ptr = (zval *) arg;
775-
int fd=-1;
777+
int fd = -1;
776778
zend_llist header;
777779
void *event_extra_data = NULL;
778780
int llen = 0;
@@ -859,7 +861,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
859861
while (!multipart_buffer_eof(mbuff TSRMLS_CC))
860862
{
861863
char buff[FILLUNIT];
862-
char *cd = NULL,*param = NULL, *filename = NULL, *tmp = NULL;
864+
char *cd = NULL, *param = NULL, *filename = NULL, *tmp = NULL;
863865
size_t blen = 0, wlen = 0;
864866
off_t offset;
865867

@@ -1083,7 +1085,6 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
10831085
#endif
10841086
cancel_upload = UPLOAD_ERROR_B;
10851087
} else if (blen > 0) {
1086-
10871088
wlen = write(fd, buff, blen);
10881089

10891090
if (wlen == -1) {
@@ -1118,7 +1119,6 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
11181119
cancel_upload = 5;
11191120
}
11201121
#endif
1121-
11221122
if (php_rfc1867_callback != NULL) {
11231123
multipart_event_file_end event_file_end;
11241124

@@ -1152,7 +1152,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
11521152
if (array_index) {
11531153
efree(array_index);
11541154
}
1155-
array_index = estrndup(start_arr+1, array_len-2);
1155+
array_index = estrndup(start_arr + 1, array_len - 2);
11561156
}
11571157

11581158
/* Add $foo_name */
@@ -1338,6 +1338,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
13381338
efree(param);
13391339
}
13401340
}
1341+
13411342
fileupload_done:
13421343
if (php_rfc1867_callback != NULL) {
13431344
multipart_event_end event_end;
@@ -1348,6 +1349,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
13481349

13491350
SAFE_RETURN;
13501351
}
1352+
/* }}} */
13511353

13521354
/*
13531355
* Local variables:

0 commit comments

Comments
 (0)