shithub: femtolisp

Download patch

ref: f5c6e64d0cac5529490919e737f0858f8a42fc16
parent: a5e537ceac98fde7b3050b1d310764caad9124da
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Fri Mar 10 12:13:34 EST 2023

bzero -> memset

--- a/llt/socket.c
+++ b/llt/socket.c
@@ -44,7 +44,7 @@
     sockfd = mysocket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
     if (sockfd < 0)
         return -1;
-    bzero(&serv_addr, sizeof(serv_addr));
+    memset(&serv_addr, 0, sizeof(serv_addr));
     serv_addr.sin_family = AF_INET;
     serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
     serv_addr.sin_port = htons(portno);
@@ -67,7 +67,7 @@
     sockfd = mysocket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
     if (sockfd < 0)
         return -1;
-    bzero(&serv_addr, sizeof(serv_addr));
+    memset(&serv_addr, 0, sizeof(serv_addr));
     serv_addr.sin_family = AF_INET;
     serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
     serv_addr.sin_port = htons(*portno);
@@ -90,7 +90,7 @@
     sockfd = mysocket(PF_INET, SOCK_DGRAM, 0);
     if (sockfd < 0)
         return -1;
-    bzero(&serv_addr, sizeof(serv_addr));
+    memset(&serv_addr, 0, sizeof(serv_addr));
     serv_addr.sin_family = AF_INET;
     serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
     serv_addr.sin_port = htons(*portno);