summary refs log tree commit diff
path: root/src/libstddjb/ip4_scanu32.c
blob: a305926e6744396dd98596b20c06a8ba0b59aa8e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
/* ISC license. */

#include <skalibs/uint32.h>
#include <skalibs/fmtscan.h>

unsigned int ip4_scanu32 (char const *s, uint32 *ip)
{
  char pack[4] ;
  register unsigned int r = ip4_scan(s, pack) ;
  if (r) uint32_unpack_big(pack, ip) ;
  return r ;
}