1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Workaround an MSan false positive.

llvm-svn: 175156
This commit is contained in:
Evgeniy Stepanov 2013-02-14 12:18:32 +00:00
parent aa5d21bae6
commit 34a8be73a2

View File

@ -224,6 +224,8 @@ static unsigned getColumns(int FileID) {
#if defined(HAVE_SYS_IOCTL_H) && defined(HAVE_TERMIOS_H)
// Try to determine the width of the terminal.
struct winsize ws;
// Zero-fill ws to avoid a false positive from MemorySanitizer.
memset(&ws, 0, sizeof(ws));
if (ioctl(FileID, TIOCGWINSZ, &ws) == 0)
Columns = ws.ws_col;
#endif