로그인체크함수를 만들고있는데 회원가입 형태를 연결리스트 형태로 했어요 그런데 로그인체크 함수를 만들었는데 그게 잘안되서  어떻게 수정해야할까요?


void l_ch(char ID2,char PW2,struct regist1 *snode){   // *snode는 연결리스트 시작주소 ID2 PW2
struct regist1 *lnode = snode;                          //는 입력받는 아이디와 비밀번호
if (lnode->pNext != NULL){
if (lnode->pNext->ID == ID2){
if (lnode->pNext->PW == PW2){
list();
}
else
l_ch(ID2, PW2, lnode->pNext);
}
else{
l_ch(ID2, PW2, lnode->pNext);
}
l_ch(ID2,PW2,lnode->pNext);
}
else{
menu(NULL, NULL);
}
}

이것은 연결리스트 구조체에요

typedef struct regist1{
char ID[10];
char PW[15];
char e_mail[25];
struct regist1 *pNext;
}regist1;