rx: Remove needless braces
[openafs.git] / src / rx / rx_user.c
index bbda449..2cc9c2d 100644 (file)
@@ -48,6 +48,8 @@
 #include "rx_atomic.h"
 #include "rx_globals.h"
 #include "rx_stats.h"
+#include "rx_packet.h"
+
 #ifdef AFS_PTHREAD_ENV
 
 /*
@@ -607,7 +609,7 @@ rx_GetIFInfo(void)
                fudge_netmask(rxi_NetAddrs[rxi_numNetAddrs]);
 #ifdef SIOCGIFNETMASK
            res = ioctl(s, SIOCGIFNETMASK, ifr);
-           if ((res == 0)) {
+           if (res == 0) {
                a = (struct sockaddr_in *)&ifr->ifr_addr;
                myNetMasks[rxi_numNetAddrs] = ntohl(a->sin_addr.s_addr);
                /* fprintf(stderr, "if %s subnetmask=0x%x\n",
@@ -764,10 +766,15 @@ rx_SetNoJumbo(void)
 
 /* Override max MTU.  If rx_SetNoJumbo is called, it must be
    called before calling rx_SetMaxMTU since SetNoJumbo clobbers rx_maxReceiveSize */
-void
+int
 rx_SetMaxMTU(int mtu)
 {
+    if (mtu < RX_MIN_PACKET_SIZE || mtu > RX_MAX_PACKET_DATA_SIZE)
+       return EINVAL;
+
     rx_MyMaxSendSize = rx_maxReceiveSizeUser = rx_maxReceiveSize = mtu;
+
+    return 0;
 }
 
 #if defined(ADAPT_PMTU)