commit-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_4-99-g908bfc


From: Tim Ruehsen
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_4-99-g908bfc8
Date: Sat, 29 Feb 2020 13:42:13 -0500 (EST)

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  908bfc85edc5d5a8484e8e5f130aa879b6994dee (commit)
      from  22243e6f8e3f2a95709f1a9e9e0a1660dd4cf745 (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=908bfc85edc5d5a8484e8e5f130aa879b6994dee


commit 908bfc85edc5d5a8484e8e5f130aa879b6994dee
Author: Tim Rühsen <address@hidden>
Date:   Sat Feb 29 19:42:00 2020 +0100

    telnet/commands.c: Use strdup instead malloc+strcpy

diff --git a/telnet/commands.c b/telnet/commands.c
index a0e1566..d935108 100644
--- a/telnet/commands.c
+++ b/telnet/commands.c
@@ -2583,10 +2583,8 @@ tn (int argc, char *argv[])
     }
 
   free (hostname);
-  hostname = malloc (strlen (hostp) + 1);
-  if (hostname)
-    strcpy (hostname, hostp);
-  else
+  hostname = strdup (hostp);
+  if (!hostname)
     {
       printf ("Can't allocate memory to copy hostname\n");
       return 0;

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

Summary of changes:
 telnet/commands.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]