Check result of "write"
Some distros enable _FORTIFY_SOURCE by default, which caught a failure to check the result of "write" in scoped_mmap-selftests.c. This patch fixes the problem. ChangeLog 2018-08-08 Tom Tromey <tom@tromey.com> * unittests/scoped_mmap-selftests.c: Check result of "write".
This commit is contained in:
parent
5c720ed886
commit
83202f7ae8
|
@ -1,3 +1,7 @@
|
|||
2018-08-08 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* unittests/scoped_mmap-selftests.c: Check result of "write".
|
||||
|
||||
2018-08-08 Jim Wilson <jimw@sifive.com>
|
||||
|
||||
* riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
|
||||
|
|
|
@ -91,7 +91,7 @@ test_normal ()
|
|||
int fd = mkstemp (filename);
|
||||
SELF_CHECK (fd >= 0);
|
||||
|
||||
write (fd, "Hello!", 7);
|
||||
SELF_CHECK (write (fd, "Hello!", 7) == 7);
|
||||
close (fd);
|
||||
|
||||
gdb::unlinker unlink_test_file (filename);
|
||||
|
|
Loading…
Reference in New Issue