瀏覽代碼

This is a touch cleaner, avoids using the comma operator.

Eric Andersen 24 年之前
父節點
當前提交
ec68a1fa64
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      libc/inet/resolv.c

+ 3 - 2
libc/inet/resolv.c

@@ -167,8 +167,9 @@ int decode_dotted(const unsigned char *data, int offset,
 	if (!data)
 		return -1;
 
-	while ((measure && total++), (l=data[offset++])) {
-
+	while ((l=data[offset++])) {
+		if (measure)
+		    total++;
 		if ((l & 0xc0) == (0xc0)) {
 			if (measure)
 				total++;