Fix fwrite usage in tl-parser.

This commit is contained in:
levlam 2021-12-24 00:06:14 +03:00
parent f1707c8b4d
commit 8aa95a98ca
1 changed files with 3 additions and 3 deletions

View File

@ -85,14 +85,14 @@ void print_backtrace (void) {
}
#else
void print_backtrace (void) {
if (fwrite ("No libexec. Backtrace disabled\n", 32, 1, stderr) < 0) {
if (fwrite ("No libexec. Backtrace disabled\n", 32, 1, stderr) != 1) {
// Sad thing
}
}
#endif
void sig_segv_handler (int signum __attribute__ ((unused))) {
if (fwrite ("SIGSEGV received\n", 18, 1, stderr) < 0) {
if (fwrite ("SIGSEGV received\n", 18, 1, stderr) != 1) {
// Sad thing
}
print_backtrace ();
@ -100,7 +100,7 @@ void sig_segv_handler (int signum __attribute__ ((unused))) {
}
void sig_abrt_handler (int signum __attribute__ ((unused))) {
if (fwrite ("SIGABRT received\n", 18, 1, stderr) < 0) {
if (fwrite ("SIGABRT received\n", 18, 1, stderr) != 1) {
// Sad thing
}
print_backtrace ();