diff options
author | Hiroki Sato <hrs@FreeBSD.org> | 2018-04-04 04:21:19 +0000 |
---|---|---|
committer | Hiroki Sato <hrs@FreeBSD.org> | 2018-04-04 04:21:19 +0000 |
commit | d684f11da759490a8d98d7b790796106285f4084 (patch) | |
tree | 27b7356df710fdf1440fe2c23154b8121e99f2ab /lib/roken/test-mem.c | |
parent | f52d4664e3f68828c06f85bfc1afa271e3e04713 (diff) |
Import Heimdal 7.5.0.vendor/heimdal/7.5.0
Notes
Notes:
svn path=/vendor-crypto/heimdal/dist/; revision=331978
svn path=/vendor-crypto/heimdal/7.5.0/; revision=331979; tag=vendor/heimdal/7.5.0
Diffstat (limited to 'lib/roken/test-mem.c')
-rw-r--r-- | lib/roken/test-mem.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/roken/test-mem.c b/lib/roken/test-mem.c index 2ce961e06340..5ae10172aea2 100644 --- a/lib/roken/test-mem.c +++ b/lib/roken/test-mem.c @@ -70,13 +70,16 @@ static RETSIGTYPE segv_handler(int sig) { int fd; + ssize_t ret; char msg[] = "SIGSEGV i current test: "; fd = open("/dev/stdout", O_WRONLY, 0600); if (fd >= 0) { - (void)write(fd, msg, sizeof(msg) - 1); - (void)write(fd, testname, strlen(testname)); - (void)write(fd, "\n", 1); + ret = write(fd, msg, sizeof(msg) - 1); + if (ret != -1) + ret = write(fd, testname, strlen(testname)); + if (ret != -1) + ret = write(fd, "\n", 1); close(fd); } _exit(1); |