summaryrefslogtreecommitdiffstats
path: root/usr.bin/diff/xmalloc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* asprintf returns -1, not an arbitrary value < 0. Also upon error thederaadt2019-06-281-2/+2
| | | | | | | (very sloppy specification) leaves an undefined value in *ret, so it is wrong to inspect it, the error condition is enough. discussed a little with nicm, and then much more with millert until we were exasperated
* Merge xmalloc.[ch] files across base, skipping OpenSSH for now.tobias2015-11-171-7/+9
| | | | ok nicm
* xmalloc/free wrappers don't need to support 20 year old non comformancetedu2015-09-251-20/+6
|
* Use strdup in xstrdup; from Fritjof Bornebusch.nicm2015-06-171-5/+3
|
* Change internal xrealloc() to a idiom-following xreallocarray().deraadt2015-04-291-11/+3
| | | | | | | This loses a "new size is 0" failure case. Probably not relevant; and since we develop this in OpenBSD, we'll catch that before someone else imports this... ok millert
* Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@millert2015-02-051-2/+2
|
* Fix bogus errx(2, NULL) usage; malloc() failure should use err(2, NULL).millert2013-08-191-8/+8
| | | | | For size and overflow errors, use the same error messages as ecalloc(). OK otto@
* exit(2) on xcalloc failure. From Daniel Dickman <didickman () gmailray2010-08-041-4/+4
| | | | | | ! com>, thanks! OK deraadt
* More cvs/diff/rcs convergence:ray2009-06-071-2/+18
| | | | | | | | | | | 1. Mostly variable/function renaming, SIZE_T_MAX->SIZE_MAX, and spacing. 2. One strchr -> strncspn. 3. diff had a weird thing where it set file[12] = ofile[12] but never updated file or ofile, then if file and ofile were different it freed it. I removed it. OK millert
* Bring in some changes from rcsdiff:ray2007-05-291-0/+91
1. Replace all the e*alloc functions with the x*alloc versions. 2. Whitespace syncs according to style. 3. Remove the __inline stuff. 4. Remove the min/max functions, using the MAX/MIN macros instead. OK millert@