repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git]
/
compiler-rt
/
test
/
msan
/
Linux
/
tcgetattr.cpp
blob
454b7fd1537e9305a0a36a5f0c9043c300c703d9
1
// RUN: %clangxx_msan -O0 %s -o %t && %run %t %p
2
3
#include <assert.h>
4
#include <glob.h>
5
#include <stdio.h>
6
#include <stdlib.h>
7
#include <termios.h>
8
#include <unistd.h>
9
10
int
main
(
int
argc
,
char
*
argv
[]) {
11
int
fd
=
getpt
();
12
assert
(
fd
>=
0
);
13
14
struct
termios t
;
15
int
res
=
tcgetattr
(
fd
, &
t
);
16
assert
(!
res
);
17
18
if
(
t
.
c_iflag
==
0
)
19
exit
(
0
);
20
return
0
;
21
}