/* Search a Question in Form scope using its QuestionId. */
HII_STATEMENT* QuestionIdInForm(IN HII_FORM *Form, IN UINT16 QuestionId)
/* Search a Question in Form scope using its QuestionId. */
HII_STATEMENT* QuestionIdInForm(IN HII_FORM *Form, IN UINT16 QuestionId)
{
  LIST_ENTRY     *Link;
  HII_STATEMENT  *Question;
  if ((QuestionId == 0) || (Form == NULL)) {
    return NULL;
  }
  Link = GetFirstNode (&Form->StatementListHead);
  while (!IsNull (&Form->StatementListHead, Link)) {
    Question = HII_STATEMENT_FROM_LINK (Link);
    if (Question->QuestionId == QuestionId) {
      return Question;
    }
    Link = GetNextNode (&Form->StatementListHead, Link);
  }
  return NULL;
}