From 7df38e1e83fd1fe5a9dee73bf8c346deb4e972f9 Mon Sep 17 00:00:00 2001 From: mdw Date: Fri, 26 Jun 1998 10:32:54 +0000 Subject: [PATCH] Cosmetic change: use sizeof(destination) in memcpy. --- src/bcquery.c | 7 +++++-- src/become.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/bcquery.c b/src/bcquery.c index e43d075..ff2948b 100644 --- a/src/bcquery.c +++ b/src/bcquery.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: bcquery.c,v 1.1 1998/04/23 13:20:20 mdw Exp $ + * $Id: bcquery.c,v 1.2 1998/06/26 10:32:31 mdw Exp $ * * Query and dump Become's configuration file * @@ -29,6 +29,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: bcquery.c,v $ + * Revision 1.2 1998/06/26 10:32:31 mdw + * Cosmetic change: use sizeof(destination) in memcpy. + * * Revision 1.1 1998/04/23 13:20:20 mdw * Added new program to verify and query Become configuration files. * @@ -326,7 +329,7 @@ static qnode *qparse_atom(void) if (!h) die("unknown host `%s'", optarg); q->q_cat = cat_where; - memcpy(&q->q_in, h->h_addr, sizeof(struct in_addr)); + memcpy(&q->q_in, h->h_addr, sizeof(q->q_in)); nextopt(); return (q); } diff --git a/src/become.c b/src/become.c index 54cd4d3..c5df906 100644 --- a/src/become.c +++ b/src/become.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: become.c,v 1.17 1998/06/18 15:06:59 mdw Exp $ + * $Id: become.c,v 1.18 1998/06/26 10:32:54 mdw Exp $ * * Main code for `become' * @@ -29,6 +29,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: become.c,v $ + * Revision 1.18 1998/06/26 10:32:54 mdw + * Cosmetic change: use sizeof(destination) in memcpy. + * * Revision 1.17 1998/06/18 15:06:59 mdw * Close log before execing program to avoid leaving a socket open. * @@ -955,7 +958,7 @@ done_options: uname(&u); if ((he = gethostbyname(u.nodename)) == 0) die("who am I? (can't resolve `%s')", u.nodename); - memcpy(&rq.host, he->h_addr, sizeof(struct in_addr)); + memcpy(&rq.host, he->h_addr, sizeof(rq.host)); } /* --- Fiddle with group ownerships a bit --- */ -- 2.11.0