Path: utzoo!utgpu!water!watmath!clyde!rutgers!cmcl2!brl-adm!umd5!ames!pasteur!ucbvax!hplabs!decwrl!labrea!glacier!jbn From: jbn@glacier.STANFORD.EDU (John B. Nagle) Newsgroups: comp.lang.c Subject: Re: Another way (How not to write a loop) Message-ID: <17319@glacier.STANFORD.EDU> Date: 20 Feb 88 19:15:17 GMT References: <560@naucse.UUCP> <1988Feb11.200149.25172@sq.uucp> <2115@bsu-cs.UUCP> <7278@brl-smoke.ARPA> <2049@rti.UUCP> Reply-To: jbn@glacier.UUCP (John B. Nagle) Organization: Stanford University Lines: 13 Another classic problem is the fact that the difference between two unsigned values is itself unsigned. Thus, unsigned short a,b; a = 1; b = 2; if (a - b < 0) printf("B smaller than A\n"); is invalid. This particular strangeness caused an obscure bug in 4.3BSD networking which prevented interoperation of 4.3BSD's TCP with some other TCP implementations, including TOPS-20.