Back to index

glibc  2.9
argz-append.c File Reference
#include <argz.h>
#include <string.h>
#include <stdlib.h>

Go to the source code of this file.


error_t __argz_append (char **argz, size_t *argz_len, const char *buf, size_t buf_len)
 weak_alias (__argz_append, argz_append)

Function Documentation

error_t __argz_append ( char **  argz,
size_t argz_len,
const char *  buf,
size_t  buf_len 

Definition at line 27 of file argz-append.c.

  size_t new_argz_len = *argz_len + buf_len;
  char *new_argz = realloc (*argz, new_argz_len);
  if (new_argz)
      memcpy (new_argz + *argz_len, buf, buf_len);
      *argz = new_argz;
      *argz_len = new_argz_len;
      return 0;
    return ENOMEM;

Here is the caller graph for this function:

Definition at line 41 of file argz-append.c.

  return __argz_append (argz, argz_len, str, strlen (str) + 1);

Here is the call graph for this function: