summaryrefslogtreecommitdiff
path: root/src/libnsss/nsss_unix_field.c
blob: b77bb047fccfdaf106adf3b101c8f27ad702cb58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* ISC license. */

#include <string.h>
#include "nsss-unix-internal.h"

int nsss_unix_field (char **field, char **s)
{
  char *p = strchr(*s, ':') ;
  if (!p) return 0 ;
  *p++ = 0 ;
  *field = *s ;
  *s = p ;
  return 1 ;
}