关于链表的传入传出头指针有关问题——————急

关于链表的传入传出头指针问题——————急!
关于链表的传入传出头指针问题——————急!

两个不同文件的
list.c
void smsque_insert_node(struct smsgw_smsque_s *node_asp,struct smsgw_smsque_s *head_node)
{
struct smsgw_smsque_s *temp_p;
if(head_node == NULL){
node_asp->next = NULL;
head_node = node_asp;
}
else{
for(temp_p=head_node;temp_p->next;temp_p=temp_p->next) ;
temp_p->next = node_asp;
node_asp->next = NULL;
}
}
 
  main.c
int main()
{
  struct smsgw_smsque_s *head_node = NULL;
node_p = smsque_make_node(5);
smsque_insert_node(node_p,*head_node);

}

为什么头指针经过insert调用后依然是null值???

------解决方案--------------------
void smsque_insert_node(struct smsgw_smsque_s *node_asp,struct smsgw_smsque_s **head_node)

smsque_insert_node(node_p,&head_node);
------解决方案--------------------
void smsque_insert_node(struct smsgw_smsque_s *node_asp,struct smsgw_smsque_s *head_node);
(1)
//这个函数是值(指针值)传递的,你可以改成引用的,比如
void smsque_insert_node(struct smsgw_smsque_s *node_asp,struct smsgw_smsque_s *&head_node);
(2)或者改成指针(head_node的指针)传递,比如
void smsque_insert_node(struct smsgw_smsque_s *node_asp,struct smsgw_smsque_s **p_head_node);
调用时,这样将 &head_node带入到函数的 p_head_ndoe,而函数里对head_node的改变都用 (*p_head_node)来替换