Back to index

glibc  2.9
Functions
bug-ga2.c File Reference
#include <mcheck.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>

Go to the source code of this file.

Functions

int main (void)

Function Documentation

int main ( void  )

Definition at line 8 of file bug-ga2.c.

{
  struct addrinfo hints, *res;
  int i, ret;

  mtrace ();
  for (i = 0; i < 100; i++)
    {
      memset (&hints, 0, sizeof (hints));
      hints.ai_family = PF_UNSPEC;
      hints.ai_socktype = SOCK_STREAM;

      ret = getaddrinfo ("www.gnu.org", "http", &hints, &res);

      if (ret)
       {
         printf ("%s\n", gai_strerror (ret));
         return 1;
       }
      freeaddrinfo (res);
    }
  return 0;
}

Here is the call graph for this function: