if (retval) {
if (retval != NULL) {
char * wallet_GetDoubleString(char * szMessage, char * szMessage2, PRBool& matched){  nsString password, password2;  PRBool retval;  nsresult res;    NS_WITH_SERVICE(nsIPrompt, dialog, kNetSupportDialogCID, &res);  if (NS_FAILED(res)) {    return NULL;     // XXX should return the error  }  const nsString message = szMessage;  const nsString message2 = szMessage2;  PRUnichar* pwd;  PRUnichar* pwd2;  retval = PR_FALSE; /* in case user exits dialog by clicking X */#ifdef PROMPT_DOUBLE_PASSWORD  res = dialog->PromptDoublePassword    (message.GetUnicode(), message2.GetUnicode(), &pwd, &pwd2, &retval);#else  res = dialog->PromptPassword(message.GetUnicode(), &pwd, &retval);  if (NS_FAILED(res)) {    return NULL;  }  res = dialog->PromptPassword(message2.GetUnicode(), &pwd2, &retval);#endif  if (NS_FAILED(res)) {    return NULL;  }  password = pwd;  password2 = pwd2;  delete[] pwd;  delete[] pwd2;  matched = (password == password2);  if (retval) {    return password.ToNewCString();  } else {    return NULL; /* user pressed cancel */  }}