tAdd newlines in error messages - phroxy - Gopher to HTTP proxy
 (HTM) git clone git://git.z3bra.org/phroxy.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit c98cfd1ee68525144b1041c72d41b14febb33677
 (DIR) parent 338b20f4ebd64a68962bedde167b480c3ceb3dee
 (HTM) Author: Willy Goiffon <dev@z3bra.org>
       Date:   Tue, 15 Sep 2020 13:46:12 +0200
       
       Add newlines in error messages
       
       Diffstat:
         M phroxy.c                            |      10 +++++-----
       
       1 file changed, 5 insertions(+), 5 deletions(-)
       ---
 (DIR) diff --git a/phroxy.c b/phroxy.c
       t@@ -50,7 +50,7 @@ connectto(const char *host, const char *port)
                sigprocmask(SIG_BLOCK, &set, &oset);
        
                if ((r = getaddrinfo(host, port, &hints, &addrs))) {
       -                fprintf(stderr, "Can't resolve hostname \"%s\": %s", host, gai_strerror(r));
       +                fprintf(stderr, "Can't resolve hostname \"%s\": %s\n", host, gai_strerror(r));
                        goto err;
                }
        
       t@@ -68,11 +68,11 @@ connectto(const char *host, const char *port)
                freeaddrinfo(addrs);
        
                if (sock < 0) {
       -                fprintf(stderr, "Can't open socket: %s", strerror(errno));
       +                fprintf(stderr, "Can't open socket: %s\n", strerror(errno));
                        goto err;
                }
                if (r < 0) {
       -                fprintf(stderr, "Can't connect to: %s:%s: %s", host, port, strerror(errno));
       +                fprintf(stderr, "Can't connect to: %s:%s: %s\n", host, port, strerror(errno));
                        goto err;
                }
        
       t@@ -102,7 +102,7 @@ sendselector(int sock, const char *selector)
        
                free(msg);
                if (n == -1)
       -                fprintf(stderr, "Can't send message: %s", strerror(errno));
       +                fprintf(stderr, "Can't send message: %s\n", strerror(errno));
        
                return n;
        }
       t@@ -133,7 +133,7 @@ getrawitem(int sock, size_t *sz)
                        *sz = buf - raw;
        
                if (n < 0) {
       -                fprintf(stderr, "Can't read socket: %s", strerror(errno));
       +                fprintf(stderr, "Can't read socket: %s\n", strerror(errno));
                        free(raw);
                }