summaryrefslogtreecommitdiff
path: root/gnu/libexec/uucp/libuucp/strchr.c
blob: ca8d8e9b1bdfb98a773910dfe97a0dad000c5a1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* strchr.c
   Look for a character in a string.  This works for a null byte.  */

#include "uucp.h"

char *
strchr (z, b)
     const char *z;
     int b;
{
  b = (char) b;
  while (*z != b)
    if (*z++ == '\0')
      return NULL;
  return (char *) z;
}