Skip to content

Commit 03cd770

Browse files
committed
Address review comments
1 parent 0e8d196 commit 03cd770

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Zend/zend_compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1941,7 +1941,7 @@ ZEND_API size_t zend_dirname(char *path, size_t len)
19411941
/* Note that on Win32 CWD is per drive (heritage from CP/M).
19421942
* This means dirname("c:foo") maps to "c:." or "c:" - which means CWD on C: drive.
19431943
*/
1944-
if ((2 <= len) && zend_isalpha_ascii((int)((unsigned char *)path)[0]) && (':' == path[1])) {
1944+
if ((2 <= len) && zend_isalpha_ascii(((unsigned char *)path)[0]) && (':' == path[1])) {
19451945
/* Skip over the drive spec (if any) so as not to change */
19461946
path += 2;
19471947
len_adjust += 2;

Zend/zend_operators.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ static zend_always_inline bool zend_isalpha_ascii(unsigned char c) {
421421
/* Returns true for a-z and A-Z in a locale-independent way.
422422
* This is implemented in a way that can avoid branching. Note that ASCII 'a' == 'A' | 0x20. */
423423
c = (c | 0x20) - 'a';
424-
return c <= ('z' - 'a' + 1);
424+
return c <= ('z' - 'a');
425425
}
426426
#define zend_isalnum_ascii(c) (zend_isalnum_map[(unsigned char)(c)])
427427

0 commit comments

Comments
 (0)