一个关于标准C的文件操作函数的很纠结的有关问题

一个关于标准C的文件操作函数的很纠结的问题
程序代码如下
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
FILE *fp_source,*fp_destine;
char buf[512];
char source[20],destine[20];

    printf("please input source filename:\n");
    scanf("%s",source);
    if((fp_source = fopen(source,"r")) == NULL)
    {     
     fprintf(stderr,"Error opening file %s\n",source);
     exit(1);
    }
    
    printf("please input destine filename:\n");
    scanf("%s", destine);
    if((fp_destine = fopen(destine,"w")) = NULL)
    {
     fprintf(stderr,"Error opening file %s\n",destine);
     exit(1);
    }

    while(!feof(fp_source))
    {
fgets(buf,sizeof(buf), fp_source);
fputs(buf,fp_destine);
    }

    printf("\nOk!\n");
    fclose(fp_source);
    fclose(fp_destine);
return 0;
}

程序执行输入如下
一个关于标准C的文件操作函数的很纠结的有关问题

程序执行时报错
一个关于标准C的文件操作函数的很纠结的有关问题

不知道是什么原因了?这部分的知识不是很熟悉!望高手指教!

------解决方案--------------------
if((fp_destine = fopen(destine,"w")) = NULL) //是==

最好这么写 if( NULL==(fp_destine = fopen(destine,"w")))