aboutsummaryrefslogtreecommitdiff
path: root/libshouldbeinlibc/idvec.c
Commit message (Collapse)AuthorAgeFilesLines
* Modernize code by removing use of old style definitions.Flavio Cruz2023-04-031-1/+1
| | | | | Also add -Werror=old-style-definition to enforce new code. Message-Id: <ZBZ+8xf7GHy2RT/h@jupiter.tail36e24.ts.net>
* Avoid passing NULL to memcpySamuel Thibault2023-02-021-1/+2
|
* Replace bcopy with memcpy or memmove as appropriate.Justus Winter2017-08-051-3/+3
| | | | | | | | | | | * boot/boot.c: Replace bcopy with memcpy or memmove as appropriate. * exec/hashexec.c: Likewise. * libps/proclist.c: Likewise, but also fix the amount of data copied. * libps/procstat.c: Likewise. * libps/spec.c: Likewise. * libshouldbeinlibc/cacheq.c: Likewise. * libshouldbeinlibc/idvec.c: Likewise. * libshouldbeinlibc/timefmt.c: Likewise.
* Replace `bzero' with `memset'Justus Winter2014-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For reference, this patch was created using the following semantic patch, and then manually applying the change in all functions containing nested functions, as those are not supported by Coccinelle. @@ expression A, B; @@ - bzero (A, B) + memset (A, 0, B) * auth/auth.c: Replace `bzero' with `memset'. * boot/boot.c: Likewise. * defpager/defpager.c: Likewise. * exec/exec.c: Likewise. Also, drop `safe_bzero' and just use `hurd_safe_memset' directly. * ext2fs/ext2fs.c: Likewise. * ext2fs/getblk.c: Likewise. * ext2fs/pager.c: Likewise. * fatfs/pager.c: Likewise. * ftpfs/dir.c: Likewise. * ftpfs/netfs.c: Likewise. * isofs/inode.c: Likewise. * isofs/pager.c: Likewise. * libdiskfs/file-getfh.c: Likewise. * libdiskfs/file-statfs.c: Likewise. * libfshelp/fetch-root.c: Likewise. * libfshelp/start-translator.c: Likewise. * libftpconn/create.c: Likewise. * libftpconn/open.c: Likewise. * libftpconn/unix.c: Likewise. * libpipe/pipe.c: Likewise. * libps/procstat.c: Likewise. * libps/spec.c: Likewise. * libshouldbeinlibc/cacheq.c: Likewise. * libshouldbeinlibc/idvec.c: Likewise. * libshouldbeinlibc/ugids.c: Likewise. * libstore/argp.c: Likewise. * libstore/enc.c: Likewise. * libstore/kids.c: Likewise. * libthreads/alpha/thread.c: Likewise. * libtreefs/fsys.c: Likewise. * libtrivfs/file-statfs.c: Likewise. * mach-defpager/default_pager.c: Likewise. * pfinet/glue-include/asm/uaccess.h: Likewise. * pfinet/io-ops.c: Likewise. * pfinet/options.c: Likewise. * pfinet/socket.c: Likewise. * pfinet/timer-emul.c: Likewise. * pflocal/io.c: Likewise. * startup/startup.c: Likewise. * storeio/storeio.c: Likewise. * sutils/fstab.c: Likewise. * usermux/usermux.c: Likewise. * utils/fakeauth.c: Likewise. * utils/frobauth.c: Likewise. * utils/login.c: Likewise. * utils/x.c: Likewise.
* Clean up the included header filesJustus Winter2013-11-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * libihash/ihash.c: Clean up the included header files. * libshouldbeinlibc/cacheq.c: Likewise. * libshouldbeinlibc/canon-host.c: Likewise. * libshouldbeinlibc/fsysops.c: Likewise. * libshouldbeinlibc/idvec-auth.c: Likewise. * libshouldbeinlibc/idvec.c: Likewise. * libshouldbeinlibc/idvec.h: Likewise. * libshouldbeinlibc/localhost.c: Likewise. * libshouldbeinlibc/maptime.c: Likewise. * libshouldbeinlibc/nullauth.c: Likewise. * libshouldbeinlibc/portxlate.c: Likewise. * libshouldbeinlibc/shared-dom.c: Likewise. * libshouldbeinlibc/ugids-argp.c: Likewise. * libshouldbeinlibc/ugids-auth.c: Likewise. * libshouldbeinlibc/ugids-imply.c: Likewise. * libshouldbeinlibc/ugids-merge.c: Likewise. * libshouldbeinlibc/ugids-subtract.c: Likewise. * libshouldbeinlibc/ugids-verify-auth.c: Likewise. * libshouldbeinlibc/ugids-verify.c: Likewise. * libshouldbeinlibc/ugids.c: Likewise. * libshouldbeinlibc/ugids.h: Likewise. * libshouldbeinlibc/wire.c: Likewise.
* Address gcc warningsBob Ham2012-06-301-2/+2
| | | | | | | | | | | | | | | | | | | | | * exec-reauth.c (exec_reauth): Change type of temp var i to unsigned int to address gcc warning. * idvec-impgids.c (idvec_merge_implied_gids) Change type of temp var i to unsigned int to address gcc warning. * idvec-impgids.c (idvec_merge_implied_gids): Change type of temp var i to unsigned int to address gcc warning. * idvec-rep.c (idvec_rep): Change type of temp var i to unsigned int to address gcc warning. * idvec-verify (idvec_verify): Change type of temp var i to unsigned int to address gcc warning. * idvec.c (idvec_merge_ids, idvec_remove): Change type of temp var i to unsigned int to address gcc warning. * portxlate.c (port_name_xlator_create, port_name_xlator_free): Change type of temp var i to unsigned int to address gcc warning. * timefmt.c (fmt_seconds): Cast width to int in test to modify frac_places to address gcc warning. * (ugids_verify_make_auth): Change type of temp var i to unsigned int to address gcc warning.
* fix common misspellingsJonathan Neuschäfer2011-08-201-1/+1
| | | | | | * Fix spelling with codespell[1] and manually review it. [1] http://git.profusion.mobi/cgit.cgi/lucas/codespell/
* 1999-09-29 Mark Kettenis <kettenis@gnu.org>Thomas Bushnell1999-09-301-1/+1
| | | | | | * idvec.c (idvec_setid): Switch last two arguments in call to idvec_insert_only. * idvec.h: Doc fix.
* 1999-09-27 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell1999-09-281-21/+19
| | | | | | | * idvec.c (idvec_setid): Implement Posix saved set-user id correctly. (idvec_insert_only): Doc fix. Reported by Mark Kettenis <kettenis@wins.uva.nl>.
* 1998-09-04 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1998-09-041-26/+24
| | | | | * idvec.c, idvec-auth.c (id_t): Remove typedef; use uid_t everywhere. The name `id_t' is coopted in libc now for the SVID `waitid' interface.
* (idvec_tail_contains):Miles Bader1997-05-271-15/+47
| | | | | | | | | | | | | | Rewrite. (idvec_set, idvec_merge): Make NEW arg const. (idvec_subtract, idvec_keep): New functions. (idvec_tail): Function removed (now inline in idvec.h). (idvec_set_ids, idvec_merge_ids): Make IDS arg const. (idvec_contains, idvec_tail_contains): Make IDVEC arg const.
* (idvec_insert, idvec_remove):Miles Bader1997-02-211-18/+24
| | | | | | Handle POS > IDVEC->num correctly. (idvec_insert_only): Handle POS >= IDVEC->num correctly.
* Make new functions use bcopy correctly.Thomas Bushnell1996-11-181-2/+2
|
* Tue Nov 12 19:22:58 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell1996-11-131-0/+23
| | | | | | | | | * idvec.h (idvec_set, idvec_set_ids): New functions. * idvec.c (idvec_set, idvec_set_ids): Ditto. Tue Nov 5 21:16:10 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * idvec.h (idvec_setid): Doc fix.
* (idvec_free_contents): New function.Roland McGrath1996-04-251-3/+9
|
* (idvec_merge_ids): Correctly add all IDS, even if some duplicates are avoided.Miles Bader1996-02-031-2/+3
|
* (idvec_merge_ids): Preserve duplicates internal to IDS.Miles Bader1996-01-021-5/+34
| | | | | (idvec_ensure): Alloc NUM ids, not NUM chars! (idvec_remove): Correctly copy ids when deleting.
* (idvec_remove, idvec_insert_only): New functions.Miles Bader1996-01-021-3/+41
| | | | (idvec_setid): Use idvec_insert_only() instead of idvec_insert_new().
* (idvec_free_wrapper, idvec_free, idvec_ensure, idvec_grow,Miles Bader1996-01-011-26/+152
| | | | | | idvec_tail_contains, idvec_add_new, idvec_insert_new, idvec_merge_ids, idvec_setid): New functions. (idvec_insert): Rewritten to use idvec_grow().
* (make_idvec, idvec_insert, idvec_add, idvec_contains):Miles Bader1995-12-211-30/+30
| | | | | All renamed from the corresponding `ivec' routine, and types, variable names, etc, changed accordingly.
* Initial revisionMiles Bader1995-12-171-0/+81