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_8-4-g4defb42


From: Giuseppe Scrivano
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_8-4-g4defb42
Date: Sat, 03 Jul 2010 12:51:35 +0000

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  4defb42e2558e182c3b1f3aaacf2fe6dce0f6ac3 (commit)
      from  1df1f6c87561dc9b797dd6aa47fb6bbfc57bea85 (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=4defb42e2558e182c3b1f3aaacf2fe6dce0f6ac3


commit 4defb42e2558e182c3b1f3aaacf2fe6dce0f6ac3
Author: Giuseppe Scrivano <address@hidden>
Date:   Sat Jul 3 14:50:06 2010 +0200

    Do not use `bcmp', `bcopy' and `bzero'.

diff --git a/ChangeLog b/ChangeLog
index 66603a1..add60a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2010-07-03  Giuseppe Scrivano  <address@hidden>
+
+       * configure.ac: Do not check if `bcmp', `bcopy' and `bzero' exist.
+
+       * libinetutils/des_rw.c (des_read): Use `memcpy' instead of `bcopy'.
+       (des_write): Likewise.
+       (des_clear_key): Use `memset' instead of `bzero'.
+
+       * libtelnet/encrypt.h (SAMEKEY): Use `memcmp' instead of `bcmp'.
+
+       * libinetutils/kcmd.c (kcmd): Use `memcpy' instead of `bcopy'.
+
+       * libinetutils/logwtmp.c (logwtmp_keep_open): Use `memset' instead of
+       `bzero'.
+       * ftp/ftp.c (initconn): Likewise.
+       * src/uucpd.c (main): Likewise.
+
+       * talk/get_addrs.c (get_addrs): Use `memmove' instead of `bcopy'.
+
+
 2010-06-21  Giuseppe Scrivano  <address@hidden>
 
        * ifconfig/if_index.c (if_indextoname): Return NULL on errors.
diff --git a/configure.ac b/configure.ac
index 2b60bde..52ad1b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -589,7 +589,7 @@ AC_FUNC_MMAP
 AC_FUNC_MALLOC
 AC_FUNC_REALLOC
 
-AC_CHECK_FUNCS(bcopy bcmp bzero cfsetspeed cgetent dirfd fchdir flock \
+AC_CHECK_FUNCS(cfsetspeed cgetent dirfd fchdir flock \
                fpathconf ftruncate \
               getcwd getmsg getspnam initgroups initsetproctitle killpg \
                mkstemp ptsname \
diff --git a/ftp/ftp.c b/ftp/ftp.c
index e0e2fab..e612cc5 100644
--- a/ftp/ftp.c
+++ b/ftp/ftp.c
@@ -1161,7 +1161,7 @@ initconn ()
          goto bad;
        }
 
-      bzero (&data_addr, sizeof (data_addr));
+      memset (&data_addr, 0, sizeof (data_addr));
       data_addr.sin_family = AF_INET;
       a = (char *) &data_addr.sin_addr.s_addr;
       a[0] = a0 & 0xff;
diff --git a/libinetutils/des_rw.c b/libinetutils/des_rw.c
index cf93d6e..093aa0c 100644
--- a/libinetutils/des_rw.c
+++ b/libinetutils/des_rw.c
@@ -77,8 +77,8 @@ int krb_net_read (int, char *, int);
 void
 des_clear_key ()
 {
-  bzero ((char *) key, sizeof (C_Block));
-  bzero ((char *) key_schedule, sizeof (Key_schedule));
+  memset (key, 0, sizeof (C_Block));
+  memset (key_schedule, 0, sizeof (Key_schedule));
 }
 
 
@@ -94,14 +94,14 @@ des_read (fd, buf, len)
 
   if (nstored >= len)
     {
-      bcopy (store_ptr, buf, len);
+      memcpy (buf, store_ptr, len);
       store_ptr += len;
       nstored -= len;
       return (len);
     }
   else if (nstored)
     {
-      bcopy (store_ptr, buf, nstored);
+      memcpy (buf, store_ptr, nstored);
       nreturned += nstored;
       buf += nstored;
       len -= nstored;
@@ -145,14 +145,14 @@ des_read (fd, buf, len)
   nstored = net_len;
   if (nstored > len)
     {
-      bcopy (store_ptr, buf, len);
+      memcpy (buf, store_ptr, len);
       nreturned += len;
       store_ptr += len;
       nstored -= len;
     }
   else
     {
-      bcopy (store_ptr, buf, nstored);
+      memcpy (buf, store_ptr, nstored);
       nreturned += nstored;
       nstored = 0;
     }
@@ -181,9 +181,9 @@ des_write (fd, buf, len)
        }
       garbage = random ();
       /* insert random garbage */
-      bcopy (&garbage, garbage_buf, MIN (sizeof (long), 8));
+      memcpy (garbage_buf, &garbage, MIN (sizeof (long), 8));
       /* this "right-justifies" the data in the buffer */
-      bcopy (buf, garbage_buf + 8 - len, len);
+      memcpy (garbage_buf + 8 - len, buf, len);
     }
   /* pcbc_encrypt outputs in 8-byte (64 bit) increments */
 
diff --git a/libinetutils/kcmd.c b/libinetutils/kcmd.c
index 7b046be..9f4ac57 100644
--- a/libinetutils/kcmd.c
+++ b/libinetutils/kcmd.c
@@ -153,11 +153,8 @@ kcmd (Shishi ** h, int *sock, char **ahost, u_short rport, 
char *locuser,
        }
       fcntl (s, F_SETOWN, pid);
       sin.sin_family = hp->h_addrtype;
-# if defined(ultrix) || defined(sun)
-      bcopy (hp->h_addr, (caddr_t) & sin.sin_addr, hp->h_length);
-# else
-      bcopy (hp->h_addr_list[0], (caddr_t) & sin.sin_addr, hp->h_length);
-# endif
+
+      memcpy (&sin.sin_addr, hp->h_addr, hp->h_length);
       sin.sin_port = rport;
 
       if (connect (s, (struct sockaddr *) &sin, sizeof (sin)) >= 0)
@@ -187,7 +184,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, u_short rport, 
char *locuser,
          errno = oerrno;
          perror (NULL);
          hp->h_addr_list++;
-         bcopy (hp->h_addr_list[0], (caddr_t) & sin.sin_addr, hp->h_length);
+         memcpy (& sin.sin_addr, hp->h_addr_list, hp->h_length);
          fprintf (stderr, "Trying %s...\n", inet_ntoa (sin.sin_addr));
          continue;
        }
diff --git a/libinetutils/logwtmp.c b/libinetutils/logwtmp.c
index 56ce74d..6b7bbd3 100644
--- a/libinetutils/logwtmp.c
+++ b/libinetutils/logwtmp.c
@@ -104,7 +104,7 @@ logwtmp (char *line, char *name, char *host)
 #endif
 
   /* Set information in new entry.  */
-  bzero (&ut, sizeof (ut));
+  memset (&ut, 0, sizeof (ut));
 #ifdef HAVE_STRUCT_UTMP_UT_TYPE
   ut.ut_type = USER_PROCESS;
 #endif
diff --git a/libtelnet/encrypt.h b/libtelnet/encrypt.h
index b10dfce..7f9ec49 100644
--- a/libtelnet/encrypt.h
+++ b/libtelnet/encrypt.h
@@ -83,7 +83,7 @@ typedef struct
 #  define VALIDKEY(key)        ( key[0] | key[1] | key[2] | key[3] | \
                          key[4] | key[5] | key[6] | key[7])
 
-#  define SAMEKEY(k1, k2)      (!bcmp((void *)k1, (void *)k2, sizeof(Block)))
+#  define SAMEKEY(k1, k2)      (!memcmp ((void *) k1, (void *) k2, sizeof 
(Block)))
 
 typedef struct
 {
diff --git a/src/uucpd.c b/src/uucpd.c
index 2ce1a17..195b069 100644
--- a/src/uucpd.c
+++ b/src/uucpd.c
@@ -138,7 +138,7 @@ main (int argc, char **argv)
       close (s);
     }
 
-  bzero ((char *) &myctladdr, sizeof (myctladdr));
+  memset (&myctladdr, 0, sizeof (myctladdr));
   myctladdr.sin_family = AF_INET;
   myctladdr.sin_port = sp->s_port;
 }
diff --git a/talk/get_addrs.c b/talk/get_addrs.c
index d3be196..e75df03 100644
--- a/talk/get_addrs.c
+++ b/talk/get_addrs.c
@@ -81,7 +81,7 @@ get_addrs (char *my_machine_name, char *his_machine_name)
       herror ((char *) NULL);
       exit (-1);
     }
-  bcopy (hp->h_addr, (char *) &my_machine_addr, hp->h_length);
+  memmove (&my_machine_addr, hp->h_addr, hp->h_length);
   /*
    * If the callee is on-machine, just copy the
    * network address, otherwise do a lookup...
@@ -95,7 +95,7 @@ get_addrs (char *my_machine_name, char *his_machine_name)
          herror ((char *) NULL);
          exit (-1);
        }
-      bcopy (hp->h_addr, (char *) &his_machine_addr, hp->h_length);
+      memmove (&his_machine_addr, hp->h_addr, hp->h_length);
     }
   else
     his_machine_addr = my_machine_addr;

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

Summary of changes:
 ChangeLog              |   20 ++++++++++++++++++++
 configure.ac           |    2 +-
 ftp/ftp.c              |    2 +-
 libinetutils/des_rw.c  |   16 ++++++++--------
 libinetutils/kcmd.c    |    9 +++------
 libinetutils/logwtmp.c |    2 +-
 libtelnet/encrypt.h    |    2 +-
 src/uucpd.c            |    2 +-
 talk/get_addrs.c       |    4 ++--
 9 files changed, 38 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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