[omniORB] ftime()

Leandro Fanzone leandro@hasar.com
Fri, 26 Oct 2001 10:13:33 -0300


Because you don't have to pass an unallocated pointer:

#include <sys/timeb.h>

struct timeb tp;
ftime(&tp);

The first example worked by chance.

Leandro Fanzone

Francesco.Chicchiricco@nokia.com wrote:

> Hello,
> is there anyone who knows why this piece of code works greatly:
>
>         #include <sys/timeb.h>
>
>         struct timeb *tp;
>
>         ftime(tp);
>
> and this ends with a beautiful segmentation fault:
>
>         #include <sys/timeb.h>
>
>         CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "omniORB4"); // or
> omniORB3, it's the same
>         struct timeb *tp;
>
>         ftime(tp);
>
> Please let me know. BR.
>
> ##############################################
>              Per aspera ad sidera
> ##############################################