| /* |
| * Copyright (C) 2012 Red Hat, Inc. |
| * |
| * All rights reserved. |
| * |
| * Author: Angus Salkeld <asalkeld@redhat.com> |
| * |
| * libqb is free software: you can redistribute it and/or modify |
| * it under the terms of the GNU Lesser General Public License as published by |
| * the Free Software Foundation, either version 2.1 of the License, or |
| * (at your option) any later version. |
| * |
| * libqb is distributed in the hope that it will be useful, |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| * GNU Lesser General Public License for more details. |
| * |
| * You should have received a copy of the GNU Lesser General Public License |
| * along with libqb. If not, see <http://www.gnu.org/licenses/>. |
| */ |
| |
| #include "os_base.h" |
| |
| /* Find the first occurrence of C in S or the final NUL byte. |
| */ |
| char * |
| strchrnul(const char *s, int c_in) |
| { |
| char c = c_in; |
| while (*s && (*s != c)) |
| s++; |
| |
| return (char *) s; |
| } |
| |