Explorar el Código

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

Eric Andersen hace 25 años
padre
commit
ec68a1fa64
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  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++;