Skip to content

Commit 5fc7475

Browse files
derickryoukidearitai
authored andcommitted
Update for coding standards.
1 parent 851d796 commit 5fc7475

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Diff for: ext/intl/grapheme/grapheme_string.c

+12-12
Original file line numberDiff line numberDiff line change
@@ -978,31 +978,31 @@ PHP_FUNCTION(grapheme_levenshtein)
978978

979979
intl_convert_utf8_to_utf16(&ustring1, &ustring1_len, pstr1, ZSTR_LEN(string1), &ustatus1);
980980

981-
if ( U_FAILURE( ustatus1 ) ) {
981+
if (U_FAILURE(ustatus1)) {
982982
/* Set global error code. */
983983
intl_error_set_code( NULL, ustatus1 );
984984

985985
/* Set error messages. */
986986
intl_error_set_custom_msg( NULL, "Error converting input string to UTF-16", 0 );
987987
if (ustring1) {
988-
efree( ustring1 );
988+
efree(ustring1);
989989
}
990990
RETURN_FALSE;
991991
}
992992

993993
intl_convert_utf8_to_utf16(&ustring2, &ustring2_len, pstr2, ZSTR_LEN(string2), &ustatus2);
994994

995-
if ( U_FAILURE( ustatus2 ) ) {
995+
if (U_FAILURE(ustatus2)) {
996996
/* Set global error code. */
997-
intl_error_set_code( NULL, ustatus2 );
997+
intl_error_set_code(NULL, ustatus2);
998998

999999
/* Set error messages. */
1000-
intl_error_set_custom_msg( NULL, "Error converting input string to UTF-16", 0 );
1000+
intl_error_set_custom_msg(NULL, "Error converting input string to UTF-16", 0);
10011001
if (ustring2) {
1002-
efree( ustring2 );
1002+
efree(ustring2);
10031003
}
10041004
if (ustring1) {
1005-
efree( ustring1 );
1005+
efree(ustring1);
10061006
}
10071007
RETURN_FALSE;
10081008
}
@@ -1012,8 +1012,8 @@ PHP_FUNCTION(grapheme_levenshtein)
10121012
UBreakIterator *bi1, *bi2;
10131013

10141014
int32_t strlen_1, strlen_2;
1015-
strlen_1 = grapheme_split_string(ustring1, ustring1_len, NULL, 0 );
1016-
strlen_2 = grapheme_split_string(ustring2, ustring2_len, NULL, 0 );
1015+
strlen_1 = grapheme_split_string(ustring1, ustring1_len, NULL, 0);
1016+
strlen_2 = grapheme_split_string(ustring2, ustring2_len, NULL, 0);
10171017

10181018
if (strlen_1 == 0) {
10191019
efree(ustring1);
@@ -1028,8 +1028,8 @@ PHP_FUNCTION(grapheme_levenshtein)
10281028

10291029
unsigned char u_break_iterator_buffer1[U_BRK_SAFECLONE_BUFFERSIZE];
10301030
unsigned char u_break_iterator_buffer2[U_BRK_SAFECLONE_BUFFERSIZE];
1031-
bi1 = grapheme_get_break_iterator((void*)u_break_iterator_buffer1, &ustatus1 );
1032-
bi2 = grapheme_get_break_iterator((void*)u_break_iterator_buffer2, &ustatus2 );
1031+
bi1 = grapheme_get_break_iterator((void*)u_break_iterator_buffer1, &ustatus1);
1032+
bi2 = grapheme_get_break_iterator((void*)u_break_iterator_buffer2, &ustatus2);
10331033

10341034
ut1 = utext_openUTF8(ut1, pstr1, ZSTR_LEN(string1), &ustatus1);
10351035
ubrk_setUText(bi1, ut1, &ustatus1);
@@ -1048,7 +1048,7 @@ PHP_FUNCTION(grapheme_levenshtein)
10481048
int32_t pos1 = 0;
10491049
int32_t pos2 = 0;
10501050
int32_t usrch_pos = 0;
1051-
for ( ; pos1 != UBRK_DONE; ) {
1051+
for (; pos1 != UBRK_DONE;) {
10521052
current1 = ubrk_current(bi1);
10531053
pos1 = ubrk_next(bi1);
10541054
if (pos1 == UBRK_DONE) {

0 commit comments

Comments
 (0)