mirror of
https://github.com/php/php-src.git
synced 2024-09-27 12:57:26 +00:00
Fix accidental short-circuiting when comparing fds (& warnings)
This commit is contained in:
parent
79ea51f360
commit
3b81337f80
2
phpdbg.c
2
phpdbg.c
@ -534,7 +534,7 @@ static size_t phpdbg_stdiop_write(php_stream *stream, const char *buf, size_t co
|
||||
while (data->fd >= 0) {
|
||||
struct stat stat[3];
|
||||
memset(stat, 0, sizeof(stat));
|
||||
if ((fstat(fileno(stderr), &stat[2]) < 0 && fstat(fileno(stdout), &stat[0]) < 0) || fstat(data->fd, &stat[1]) < 0) {
|
||||
if (((fstat(fileno(stderr), &stat[2]) < 0) & (fstat(fileno(stdout), &stat[0]) < 0)) | (fstat(data->fd, &stat[1]) < 0)) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -69,9 +69,9 @@ PHPDBG_SET(break) /* {{{ */
|
||||
} else {
|
||||
phpdbg_breakbase_t *brake = phpdbg_find_breakbase(param->num TSRMLS_CC);
|
||||
if (brake) {
|
||||
phpdbg_writeln("setbreak", "id=\"%d\" active=\"%s\"", "Breakpoint #%d %s", param->num, brake->disabled ? "off" : "on");
|
||||
phpdbg_writeln("setbreak", "id=\"%ld\" active=\"%s\"", "Breakpoint #%ld %s", param->num, brake->disabled ? "off" : "on");
|
||||
} else {
|
||||
phpdbg_error("setbreak", "type=\"nobreak\" id=\"%d\"", "Failed to find breakpoint #%ld", param->num);
|
||||
phpdbg_error("setbreak", "type=\"nobreak\" id=\"%ld\"", "Failed to find breakpoint #%ld", param->num);
|
||||
}
|
||||
}
|
||||
} break;
|
||||
|
Loading…
Reference in New Issue
Block a user