tty: fixed warnings about an uninitialized variable.
This commit is contained in:
@@ -1348,7 +1348,7 @@ tty_write_to_tty_master_unsafe(tty_cookie* sourceCookie, const char* data,
|
|||||||
// If in echo mode, we do the output conversion and need to update
|
// If in echo mode, we do the output conversion and need to update
|
||||||
// the needed bytes count.
|
// the needed bytes count.
|
||||||
char echoBuffer[3];
|
char echoBuffer[3];
|
||||||
size_t echoBytes;
|
size_t echoBytes = 0;
|
||||||
if (echo) {
|
if (echo) {
|
||||||
process_output_char(source, c, echoBuffer, &echoBytes, true);
|
process_output_char(source, c, echoBuffer, &echoBytes, true);
|
||||||
if (echoBytes > bytesNeeded)
|
if (echoBytes > bytesNeeded)
|
||||||
|
|||||||
@@ -1062,7 +1062,7 @@ tty_write_to_tty_master_unsafe(tty_cookie* sourceCookie, const char* data,
|
|||||||
// If in echo mode, we do the output conversion and need to update
|
// If in echo mode, we do the output conversion and need to update
|
||||||
// the needed bytes count.
|
// the needed bytes count.
|
||||||
char echoBuffer[3];
|
char echoBuffer[3];
|
||||||
size_t echoBytes;
|
size_t echoBytes = 0;
|
||||||
if (echo) {
|
if (echo) {
|
||||||
process_output_char(source, c, echoBuffer, &echoBytes, true);
|
process_output_char(source, c, echoBuffer, &echoBytes, true);
|
||||||
if (echoBytes > bytesNeeded)
|
if (echoBytes > bytesNeeded)
|
||||||
|
|||||||
Reference in New Issue
Block a user