Replace memcpy with assignment where appropriate

This commit is contained in:
z3APA3A committed 2016-02-05 18:31:17 +03:00
1 parent 3cc9796583
commit 13a7d6be11
8 files changed
+45 -41

No files matched your search

+2 -1
View File
@@ -274,7 +274,8 @@ static int h_external(int argc, unsigned char ** argv){
memset(&sa6, 0, sizeof(sa6));
res = getip46(46, argv[1], (struct sockaddr *)&sa6);
if(!res) return 1;
memcpy((*SAFAMILY(&sa6)==AF_INET)?(void *)&conf.extsa:(void *)&conf.extsa6, &sa6, sizeof(sa6));
if (*SAFAMILY(&sa6)==AF_INET) conf.extsa = sa6;
else conf.extsa6 = sa6;
#else
res = getip46(46, argv[1], (struct sockaddr *)&conf.extsa);
if(!res) return 1;