for (PRInt32 i=0; i<urlCount; i++) { url = NS_STATIC_CAST(si_SignonURLStruct*, si_signon_list->ElementAt(i)); if(url->passwordRealm && !PL_strcmp(passwordRealm, url->passwordRealm)) { return url;
if (urlCount) {  nsCAutoString realmWithoutTrailingSlash(passwordRealm); if (realmWithoutTrailingSlash.Last() == '/') realmWithoutTrailingSlash.SetLength(realmWithoutTrailingSlash.Length()-1);  for (PRInt32 i=0; i<urlCount; i++) { url = NS_STATIC_CAST(si_SignonURLStruct*, si_signon_list->ElementAt(i)); if(url->passwordRealm && !PL_strcmp(realmWithoutTrailingSlash.get(), url->passwordRealm)) { return url; }
si_GetURL(const char * passwordRealm) {  si_SignonURLStruct * url;  if (!passwordRealm) {    /* no passwordRealm specified, return first URL (returns NULL if not URLs) */    if (LIST_COUNT(si_signon_list)==0) {      return NULL;    }    return (si_SignonURLStruct *) (si_signon_list->ElementAt(0));  }  PRInt32 urlCount = LIST_COUNT(si_signon_list);  for (PRInt32 i=0; i<urlCount; i++) {    url = NS_STATIC_CAST(si_SignonURLStruct*, si_signon_list->ElementAt(i));    if(url->passwordRealm && !PL_strcmp(passwordRealm, url->passwordRealm)) {      return url;    }  }  return (NULL);}