Back to index

glibc  2.9
Functions
stpcpy_chk.c File Reference
#include <string.h>

Go to the source code of this file.

Functions

char * __stpcpy_chk (char *dest, const char *src, size_t destlen)

Function Documentation

char* __stpcpy_chk ( char *  dest,
const char *  src,
size_t  destlen 
)

Definition at line 28 of file stpcpy_chk.c.

{
  register char *d = dest;
  register const char *s = src;

  do
    {
      if (__builtin_expect (destlen-- == 0, 0))
       __chk_fail ();
      *d++ = *s;
    }
  while (*s++ != '\0');

  return d - 1;
}

Here is the call graph for this function: