This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  b0f7dcdf1621515b9cb3be89da8a0dcd33a48180 (commit)
      from  7267896f92e3df2eb935b5b8dd4adde1ee0b4c21 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=b0f7dcdf1621515b9cb3be89da8a0dcd33a48180


commit b0f7dcdf1621515b9cb3be89da8a0dcd33a48180
Author: Mats Erik Andersson <[email protected]>
Date:   Mon May 23 23:06:47 2016 +0200

    hostname: Avoid a trailing space.
    
    Suppress the space character after the last presented IP number.

diff --git a/ChangeLog b/ChangeLog
index b85e63d..9c3fa98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2016-05-23  Mats Erik Andersson  <[email protected]>
+
+       hostname: Avoid a trailing space.
+       Suppress the space character after the last presented IP number.
+       Problem reported by Terje Strand in
+       http://lists.gnu.org/archive/html/bug-inetutils/2016-04/msg00001.html
+
+       * src/hostname.c (get_ip_addresses): Emit a space character
+       only in case a further IP address will be printed.
+
 2016-02-16  Mats Erik Andersson  <[email protected]>
 
        traceroute: Subprivileged use case.
diff --git a/src/hostname.c b/src/hostname.c
index e18b9cc..f2b587d 100644
--- a/src/hostname.c
+++ b/src/hostname.c
@@ -337,7 +337,10 @@ get_ip_addresses (const char *const host_name)
             }
 
           strcat (addresses, address);
-          strcat (addresses, " ");
+
+         /* Insert a separating space character.  */
+         if (ht->h_addr_list[i+1] != NULL)
+           strcat (addresses, " ");
         }
     }
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog      |   10 ++++++++++
 src/hostname.c |    5 ++++-
 2 files changed, 14 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
GNU Inetutils 

_______________________________________________
Commit-inetutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/commit-inetutils

Reply via email to