if (NS_OK == rv && nsnull != xlibWindowService)
if (NS_SUCCEEDED(rv) && nsnull != xlibWindowService)
static nsXlibTimeToNextTimeoutFunc GetTimeToNextTimeoutFunc(void){  static nsXlibTimeToNextTimeoutFunc sFunc = nsnull;  if (!sFunc)  {    nsIXlibWindowService * xlibWindowService = nsnull;        nsresult rv = nsServiceManager::GetService(kWindowServiceCID,                                               kWindowServiceIID,                                               (nsISupports **)&xlibWindowService);        NS_ASSERTION(NS_SUCCEEDED(rv),"Couldn't obtain window service.");        if (NS_OK == rv && nsnull != xlibWindowService)    {      xlibWindowService->GetTimeToNextTimeoutFunc(&sFunc);#ifdef DEBUG_ramiro      printf("Time to next timeout func is null - for now.\n");      static int once = 1;      if (once && sFunc)      {        once = 0;        printf("YES! Time to next timeout func is good.\n");      }#endif            NS_RELEASE(xlibWindowService);    }  }  return sFunc;}