"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/test-sendmmsg.c" between
stress-ng-0.09.52.tar.xz and stress-ng-0.09.54.tar.xz

About: stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.

test-sendmmsg.c  (stress-ng-0.09.52.tar.xz):test-sendmmsg.c  (stress-ng-0.09.54.tar.xz)
skipping to change at line 42 skipping to change at line 42
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
int main(void) int main(void)
{ {
int sockfd; int sockfd;
struct sockaddr_in addr; struct sockaddr_in addr;
struct mmsghdr msg_hdr[2]; struct mmsghdr msg_hdr[2];
struct iovec msg_iov1[2], msg_iov2[3]; struct iovec msg_iov1[2], msg_iov2[3];
memset(&addr, 0, sizeof(addr)); (void)memset(&addr, 0, sizeof(addr));
memset(&msg_iov1, 0, sizeof(msg_iov1)); (void)memset(&msg_iov1, 0, sizeof(msg_iov1));
memset(&msg_iov2, 0, sizeof(msg_iov2)); (void)memset(&msg_iov2, 0, sizeof(msg_iov2));
memset(&msg_hdr, 0, sizeof(msg_hdr)); (void)memset(&msg_hdr, 0, sizeof(msg_hdr));
sockfd = socket(AF_INET, SOCK_DGRAM, 0); sockfd = socket(AF_INET, SOCK_DGRAM, 0);
if (sockfd < 0) if (sockfd < 0)
return 1; return 1;
addr.sin_family = AF_INET; addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
addr.sin_port = htons(9999); addr.sin_port = htons(9999);
if (connect(sockfd, (struct sockaddr *) &addr, sizeof(addr)) == -1) if (connect(sockfd, (struct sockaddr *) &addr, sizeof(addr)) == -1)
return 1; return 1;
 End of changes. 1 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)