From bd9d558835a033293f3ef81808f6e4290241d0ec Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Mon, 18 Nov 1996 23:54:14 +0000 Subject: Make new functions use bcopy correctly. --- libshouldbeinlibc/idvec.c | 4 ++-- libshouldbeinlibc/idvec.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libshouldbeinlibc/idvec.c b/libshouldbeinlibc/idvec.c index 67c8aea0..adebad1a 100644 --- a/libshouldbeinlibc/idvec.c +++ b/libshouldbeinlibc/idvec.c @@ -169,8 +169,8 @@ idvec_set_ids (struct idvec *idvec, id_t *ids, unsigned num) err = idvec_ensure (idvec, num); if (!err) { - bcopy (ids, idvec->ids); - ids->num = num; + bcopy (ids, idvec->ids, num * sizeof (id_t)); + idvec->num = num; } return err; } diff --git a/libshouldbeinlibc/idvec.h b/libshouldbeinlibc/idvec.h index 53ed552b..b07605e6 100644 --- a/libshouldbeinlibc/idvec.h +++ b/libshouldbeinlibc/idvec.h @@ -88,7 +88,7 @@ error_t idvec_insert_new (struct idvec *idvec, unsigned pos, uid_t id); /* Set the ids in IDVEC to IDS (NUM elements long); delete whatever the previous ids were. */ -error_t idvec_set_ids (struct idvec *idvec, id_t *ids, unsigned num); +error_t idvec_set_ids (struct idvec *idvec, uid_t *ids, unsigned num); /* Like idvec_set_ids, but get the new ids from new. */ error_t idvec_set (struct idvec *idvec, struct idvec *new); -- cgit v1.2.3