diff netio.c @ 1733:d529a52b2f7c coverity coverity

merge coverity from main
author Matt Johnston <matt@ucc.asn.au>
date Fri, 26 Jun 2020 21:07:34 +0800
parents 58f7ca8ebc82
children 97ad26e397a5
line wrap: on
line diff
--- a/netio.c	Thu Mar 21 23:28:59 2019 +0800
+++ b/netio.c	Fri Jun 26 21:07:34 2020 +0800
@@ -293,13 +293,15 @@
 	int len;
 	buffer *writebuf;
 
-	#ifndef IOV_MAX
-		#if defined(__CYGWIN__) && !defined(UIO_MAXIOV)
+#ifndef IOV_MAX
+	#if defined(__CYGWIN__) && !defined(UIO_MAXIOV)
 		#define IOV_MAX 1024
-		#else
+	#elif defined(__sgi)
+		#define IOV_MAX 512 
+	#else 
 		#define IOV_MAX UIO_MAXIOV
-		#endif
 	#endif
+#endif
 
 	*iov_count = MIN(MIN(queue->count, IOV_MAX), *iov_count);
 
@@ -398,9 +400,9 @@
 	}
 	/* linux specific, sets QoS class. see tc-prio(8) */
 	rc = setsockopt(sock, SOL_SOCKET, SO_PRIORITY, (void*) &so_prio_val, sizeof(so_prio_val));
-	if (rc < 0 && errno != ENOTSOCK)
-		dropbear_log(LOG_WARNING, "Couldn't set SO_PRIORITY (%s)",
-				strerror(errno));
+	if (rc < 0 && errno != ENOTSOCK) {
+		TRACE(("Couldn't set SO_PRIORITY (%s)", strerror(errno)))
+    }
 #endif
 
 }