summaryrefslogtreecommitdiff
path: root/sys/libkern/strchr.c
Commit message (Collapse)AuthorAgeFilesLines
* str(r)chr: Replace union abuse with __DECONSTConrad Meyer2018-06-041-11/+8
| | | | | | | | | | | | | Writing one union member and reading another is technically illegal C, although we do it in many places in the tree. Use the __DECONST macro instead, which is (technically) a valid C construct. Trivial style(9) cleanups to touched lines while here. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=334624
* sys: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326023
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Implement extensions on top of standards instead of the other way around.Ed Schouten2012-01-031-0/+52
Now that index() and rindex() have become unused, simply turn them into wrappers around strchr() and strrchr(), respectively. Notes: svn path=/head/; revision=229366