Path: utzoo!utgpu!attcan!uunet!tut.cis.ohio-state.edu!ucbvax!decwrl!eng.umd.edu!nero From: nero@eng.umd.edu (Oren L. Stern) Newsgroups: comp.lang.c Subject: Is '(NULL + 1) - 1' valid C? Message-ID: <8908112140.AA00303@euresis.eng.umd.edu> Date: 11 Aug 89 21:40:52 GMT Organization: Merriversity of Uniland, College Purgatory Lines: 10 Assuming that "NULL + 1" is non-portable C, I am now wondering if it's valid to use NULL as an expression. For example, is it valid to write: for (ptr = head; ptr; ptr = ptr->next) {...} to traverse a linked list? If not, I've got a lot of "portable" code to rewrite...:-) Oren Stern (nero@hellcat.eng.umd.edu)