Commit Graph

30 Commits

Author SHA1 Message Date
lukem b48252f365 * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
  and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

		_DIAGASSERT(path != NULL)
	#ifdef _DIAGNOSTIC
		if (path == NULL) {
			errno = EFAULT;
			return (-1);
		}
	#endif
1999-09-16 11:44:54 +00:00
abs ac83f64eca Cast argument to isspace to (unsigned char) to pass zoularis. 1999-03-29 09:27:29 +00:00
abs 5e69f8317f Fix 'suggest parentheses' warning noted by Erik E. Fair <fair@clock.org> 1999-03-23 02:58:50 +00:00
abs 6c70403fe8 If we push a cap entry (usually from the environment), strip : deliminated
entries that only contain whitespace, in a similar fashion to reading from
a file.
1999-03-22 03:28:09 +00:00
christos 3eeda4afc6 Fix gcc-2.8.1 warnings. 1999-03-16 18:13:44 +00:00
christos 920a51d98f avoid assignment of a read only location that lint does not pick, but gcc does. 1998-11-13 08:25:17 +00:00
christos ce52ab49cb delint 1998-11-12 16:25:21 +00:00
perry 98b9f211ee fix bcopy->memcpy with memcpy->memmove -- not strictly needed, but... 1998-08-26 00:38:39 +00:00
perry a843f0f8a5 bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-10 02:43:08 +00:00
mycroft f9f7e98dab const poisoning. 1998-07-27 07:41:31 +00:00
mycroft b3b504b51a Suppress blank fields due to continuation lines. 1998-07-21 13:36:54 +00:00
tv 902d175a04 PR 5170: don't fclose twice, or call ferror after fclose.
required removing fcloses and/or moving them, nulling the pointers
like they should have been, and adding a terminating null byte and break
in one case (perhaps we never ran into those problems before).
cgetclose() already does a fclose and null of the pointer, so don't
duplicate it when we don't need to.
1998-03-18 20:29:27 +00:00
thorpej 669c5bea18 Fix type size lossage on the Alpha. 1998-03-02 23:39:49 +00:00
perry 1ea84adf39 trivial changes to reduce lint complaints 1998-02-26 02:40:11 +00:00
perry 4146d58604 remove obsolete register declarations 1998-02-03 18:23:37 +00:00
kleink 66105c37fc Lseek(2) usage cleanup: the use of L_SET/L_INCR/L_XTND is deprecated,
use SEEK_SET/SEEK_CUR/SEEK_END instead.
1997-08-25 19:31:43 +00:00
jtc 43fa6fe319 If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore.  The library will use those
names internally.  Weak aliases are used to provide the original names
to the API.

This is only the first part of this change.  It is most of the functions
which are implemented in C for all NetBSD ports.  Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
1997-07-21 14:06:24 +00:00
christos d177cac3ba Fix RCSID's
Fix gcc warnings.
1997-07-13 19:00:13 +00:00
pk 58efb9d20c NULL => 0 (Arne Juul; PR#3629) 1997-05-17 19:24:44 +00:00
mrg 9cd5492c02 - convert unsafe strcpy(), strcat() and sprintf() to the `n' versions.
- some KNF.
1997-01-23 14:01:45 +00:00
mycroft ce6374e6be Do not terminate the search on errors other than ENOENT. 1995-08-24 05:26:35 +00:00
cgd 6e6a4e85b0 update to 4.4-Lite where appropriate, clean up Id format, etc. 1995-02-25 13:40:51 +00:00
cgd eac55eb1b3 slight mod 1994-03-26 02:51:45 +00:00
cgd 6fbe299b0e fix for lib/156: cgetent does access free'd memory,
from Thomas Eberhardt
1994-03-06 07:54:35 +00:00
cgd f45b975fa5 rename fgetline() 1994-01-04 05:36:22 +00:00
cgd 6039a60bb3 don't squish newline at end of fgetline()... from bostic 1993-12-22 07:10:58 +00:00
jtc 9c20f740a3 Declare rcsid strings so they are stored in text segment. 1993-08-26 00:43:03 +00:00
mycroft f23f94cb77 Add even more RCS frobs. 1993-07-30 08:21:41 +00:00
mycroft e3ea23c51a fgetline() does not return the newline. 1993-06-08 16:49:53 +00:00
cgd 8d5826635d bring in getcap routines, supplied by CSRG, from 4.4... 1993-05-18 07:37:51 +00:00