ObjFW  Check-in [12289e98ac]

Overview
Comment:OFSCTPSocket: Initialize flags for sctp_recvv to 0

This shouldn't be necessary, as flags seems to be output only, but
Valgrind complains if it is uninitialized.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 12289e98acd637733c6acdb184f5d4625d9adf1f43f86fbe1bf8be4ca01b10aa
User & Date: js on 2024-08-19 22:04:00
Other Links: manifest | tags
Context
2024-08-20
20:44
Improve compatibility with old evdev headers check-in: 27d64d775a user: js tags: trunk
2024-08-19
22:04
OFSCTPSocket: Initialize flags for sctp_recvv to 0 check-in: 12289e98ac user: js tags: trunk
21:42
forwardingTargetForSelector: for PowerPC 64/ELF v2 check-in: 119b311a62 user: js tags: trunk
Changes

Modified src/OFSCTPSocket.m from [3e4042fb0e] to [9e13ccf40f].

362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
	struct iovec iov = {
		.iov_base = buffer,
		.iov_len = length
	};
	struct sctp_rcvinfo rcvinfo;
	socklen_t rcvinfoSize = (socklen_t)sizeof(rcvinfo);
	unsigned int infotype = SCTP_RECVV_RCVINFO;
	int flags;

	if (_socket == OFInvalidSocketHandle)
		@throw [OFNotOpenException exceptionWithObject: self];

	if ((ret = sctp_recvv(_socket, &iov, 1, NULL, NULL,
	    &rcvinfo, &rcvinfoSize, &infotype, &flags)) < 0)
		@throw [OFReadFailedException







|







362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
	struct iovec iov = {
		.iov_base = buffer,
		.iov_len = length
	};
	struct sctp_rcvinfo rcvinfo;
	socklen_t rcvinfoSize = (socklen_t)sizeof(rcvinfo);
	unsigned int infotype = SCTP_RECVV_RCVINFO;
	int flags = 0;

	if (_socket == OFInvalidSocketHandle)
		@throw [OFNotOpenException exceptionWithObject: self];

	if ((ret = sctp_recvv(_socket, &iov, 1, NULL, NULL,
	    &rcvinfo, &rcvinfoSize, &infotype, &flags)) < 0)
		@throw [OFReadFailedException