Date: Wed, 06 Nov 2002 11:54:17 -0500 (EST) From: John Baldwin <jhb@FreeBSD.org> To: Marc Olzheim <marcolz@stack.nl> Cc: hackers@FreeBSD.ORG Subject: RE: /usr/src/ed/bin/re.c:99 Message-ID: <XFMail.20021106115417.jhb@FreeBSD.org> In-Reply-To: <20021106164653.GA95733@stack.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On 06-Nov-2002 Marc Olzheim wrote: > .. > if ((nd = parse_char_class(++nd)) == NULL) { > .. > > Hmmm... is this legal ? > > http://www.eskimo.com/~scs/C-faq/q3.1.html seems to tell otherwise... If it were nd++, yes. However, it is ++nd, thus, the increment happens first, then the call to parse_char_class(), then the assignment to nd. It might be clearer to rewrite this like so however: if ((nd = parse_char_class(nd + 1)) == NULL) { Since that is effectively what it is doing. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20021106115417.jhb>