Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: So You Think You Can Const? Date: Fri, 10 Jan 2025 11:08:56 -0800 Organization: None to speak of Lines: 19 Message-ID: <87msfypjuf.fsf@nosuchdomain.example.com> References: <874j27qfp7.fsf@nosuchdomain.example.com> <20250110122353.00005377@yahoo.com> <87zfjyplad.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Fri, 10 Jan 2025 20:08:57 +0100 (CET) Injection-Info: dont-email.me; posting-host="e16be66d43b38b7ea574a81744fe375a"; logging-data="204683"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18av1nNvf3VusmfxEILacg8" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:HUDNN4kLKc+6Y0XkK5vDcKIj6sE= sha1:Bm1jUy3gI6+Vqc2ZHzgfuuoad+0= Bytes: 1740 scott@slp53.sl.home (Scott Lurndal) writes: > Keith Thompson writes: >>Michael S writes: [...] >>You can even do something like this: >> >> int *ptr = malloc(sizeof *ptr); // assume malloc succeeded >> int *ptr1 = ptr + 1; >> free(ptr - 1); > > Did you mean to write > > free(ptr1 - 1); Yes, thanks. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */