Purging unused code and fixing prints in socket code

This commit is contained in:
Imbus 2025-06-25 07:30:49 +02:00
parent 196358c49f
commit cd4f1433a3
2 changed files with 1 additions and 4 deletions

View file

@ -33,7 +33,7 @@ int main() {
int bytes = recv(sock_fd, buffer, sizeof(buffer) - 1, 0); int bytes = recv(sock_fd, buffer, sizeof(buffer) - 1, 0);
if (bytes > 0) { if (bytes > 0) {
buffer[bytes] = '\0'; buffer[bytes] = '\0';
printf("Client got: %s\n", buffer); printf("Client got: %s", buffer);
} }
close(sock_fd); close(sock_fd);

View file

@ -15,9 +15,6 @@ int main(void) {
struct sockaddr_un addr; struct sockaddr_un addr;
int server_fd, client_fd; int server_fd, client_fd;
char *msg = "Hello\n";
memcpy(buf, msg, strlen(msg));
// Unlink this in case its still around // Unlink this in case its still around
unlink(SOCK_PATH); unlink(SOCK_PATH);