fix unsigned arithmetic bug in previous change
diff --git a/net.c b/net.c
index 3465980..5ab0d67 100644
--- a/net.c
+++ b/net.c
@@ -1436,7 +1436,7 @@
 	int c = 0;
 	struct opthdr hdr;
 
-	while (len >= sizeof hdr) {
+	while (len >= (int) sizeof hdr) {
 		if (umove(tcp, addr, &hdr) < 0) break;
 		if (c++) {
 			tprintf (", ");
@@ -1448,8 +1448,10 @@
 		addr += sizeof hdr;
 		len -= sizeof hdr;
 		printsockopt (tcp, hdr.level, hdr.name, addr, hdr.len);
-		addr += hdr.len;
-		len -= hdr.len;
+		if (hdr.len > 0) {
+			addr += hdr.len;
+			len -= hdr.len;
+		}
 		tprintf ("}");
 	}
 	if (len > 0) {