[hackers] [scc] Join conditions in warn_helper() || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Sun, 19 Jul 2015 11:30:43 +0200 (CEST)

commit 04b3480cb426c38028b895d6ab38cd108a9aefae
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sun Jul 19 11:27:16 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Sun Jul 19 11:27:16 2015 +0200

    Join conditions in warn_helper()

diff --git a/cc1/error.c b/cc1/error.c
index 9219fde..d42e190 100644
--- a/cc1/error.c
+++ b/cc1/error.c
_AT_@ -17,16 +17,18 @@ warn_helper(int flag, char *fmt, va_list va)
 {
         if (flag == 0)
                 return;
- if (flag < 0)
- failure = 1;
         fprintf(stderr, "%s:%u: %s: ",
                input->fname, input->nline,
                (flag < 0) ? "error" : "warning");
         vfprintf(stderr, fmt, va);
         putc('\n', stderr);
- if (flag < 0 && nerrors++ == MAXERRNUM) {
- fputs("too many errors\n", stderr);
- exit(1);
+
+ if (flag < 0) {
+ failure = 1;
+ if (nerrors++ == MAXERRNUM) {
+ fputs("too many errors\n", stderr);
+ exit(1);
+ }
         }
 }
 
Received on Sun Jul 19 2015 - 11:30:43 CEST

This archive was generated by hypermail 2.3.0 : Sun Jul 19 2015 - 11:36:13 CEST