From unknown Sat Aug 16 15:58:26 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#25332 <25332@debbugs.gnu.org> To: bug#25332 <25332@debbugs.gnu.org> Subject: Status: [PATCH] Change while loops to for loops. Reply-To: bug#25332 <25332@debbugs.gnu.org> Date: Sat, 16 Aug 2025 22:58:26 +0000 retitle 25332 [PATCH] Change while loops to for loops. reassign 25332 emacs submitter 25332 Chris Gregory severity 25332 wishlist tag 25332 patch notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 02 03:26:25 2017 Received: (at submit) by debbugs.gnu.org; 2 Jan 2017 08:26:25 +0000 Received: from localhost ([127.0.0.1]:39006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cNxwn-0004ue-5I for submit@debbugs.gnu.org; Mon, 02 Jan 2017 03:26:25 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cNxwk-0004uR-QM for submit@debbugs.gnu.org; Mon, 02 Jan 2017 03:26:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cNxwe-0002id-9r for submit@debbugs.gnu.org; Mon, 02 Jan 2017 03:26:17 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID,T_FILL_THIS_FORM_SHORT autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:60161) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cNxwe-0002iX-79 for submit@debbugs.gnu.org; Mon, 02 Jan 2017 03:26:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cNxwc-0000DT-Ll for bug-gnu-emacs@gnu.org; Mon, 02 Jan 2017 03:26:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cNxwX-0002iC-Nw for bug-gnu-emacs@gnu.org; Mon, 02 Jan 2017 03:26:14 -0500 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:35789) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cNxwX-0002i5-Hf for bug-gnu-emacs@gnu.org; Mon, 02 Jan 2017 03:26:09 -0500 Received: by mail-pg0-x244.google.com with SMTP id i5so29869356pgh.2 for ; Mon, 02 Jan 2017 00:26:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=F0xe1nt9eO/xMga/xnv/JhLq/FQiE0kf9ajVGZ5JJfE=; b=OptVC1P3AbtUh/vJ+kxK9fMPEWwt7njGzY6KcxZ3oewmuxhXnvf3dqYGKVjn2B2MwG W2PgWOkhx2RRexBUowVABwOtbGnJQWJYYHb4kJ5ohNlySpytSpic5ryGzgFiM/a3D8I6 9desJc1dw1NNeL8jtsXI2uqMOJuVgDYaukaTHLnC5wFLOuVfWW8BCehR9wgqym2QlElP 6HRUeYTIn2uBNK3CScWSAy03JX2HtFCgsMJhk0B8a5j8UkOKfsq5GI4npuTpd0mfh99K fKXSNUkNc5O007rfwJ6XYcPpx32Q4sxC4hehcQXQBUIyvWsM+JcdvpywRs1B7UITEDyU hDzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=F0xe1nt9eO/xMga/xnv/JhLq/FQiE0kf9ajVGZ5JJfE=; b=MmF7z1LqsoS0l4tJyXjUeJn707cmmLVpVMbVFGgbfqtWfQBn890plzHFGb9qK+hPef Ty2ryxVfWAEYi13d7Wl4z9ssZMdTmGNvLa7mroapIH0qz8/19bKtP4oB+VDThnEe+JyL dJJFDnAZ+s4sKG/kl5YTvqnxKaxnk0E2J5+lbnv7Nc6kfxMh4I52GQpCO2NyokSx6Wel bm8ttHbXXRjdi/LSOFt4EKboPj80QUKcPVEpkpb4NPruW3wmPy7WH9E4Rgn6XzdWFsYQ Ei0zeFxzDq6atWDQ+MKIdFSDZkwN2MwINDwDMLF3YsiOPART/rivC9zHXdoTLuhnRS2u 6hbA== X-Gm-Message-State: AIkVDXJaISMXEQJB8GhKL5UxQ3eMn4HsKTDLdeLz/E6UiNAHsZPKJAgJuccVrLD5bERCYg== X-Received: by 10.84.232.137 with SMTP id i9mr87824961plk.95.1483345568493; Mon, 02 Jan 2017 00:26:08 -0800 (PST) Received: from CzipperZeroArch (c-50-139-114-145.hsd1.or.comcast.net. [50.139.114.145]) by smtp.gmail.com with ESMTPSA id y15sm130744019pgc.43.2017.01.02.00.26.07 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Jan 2017 00:26:08 -0800 (PST) From: Chris Gregory To: bug-gnu-emacs@gnu.org Subject: [PATCH] Change while loops to for loops. Date: Mon, 02 Jan 2017 00:26:07 -0800 Message-ID: <87h95hdg0w.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) This patch changes while loops to for loops to make the code more consistent. -- Chris Gregory diff --git a/src/ralloc.c b/src/ralloc.c index 8a3d2b797f..ccc019618c 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -222,13 +222,10 @@ obtain (void *address, size_t size) /* If we can't fit SIZE bytes in that heap, try successive later heaps. */ - while (heap && (char *) address + size > (char *) heap->end) - { - heap = heap->next; - if (heap == NIL_HEAP) - break; - address = heap->bloc_start; - } + for (; heap && (char *) address + size > (char *) heap->end; + address = heap->bloc_start) + if ((heap = heap->next) == NIL_HEAP) + break; /* If we can't fit them within any existing heap, get more space. */ @@ -350,20 +347,16 @@ relinquish (void) static bloc_ptr find_bloc (void **ptr) { - bloc_ptr p = first_bloc; - - while (p != NIL_BLOC) - { - /* Consistency check. Don't return inconsistent blocs. - Don't abort here, as callers might be expecting this, but - callers that always expect a bloc to be returned should abort - if one isn't to avoid a memory corruption bug that is - difficult to track down. */ - if (p->variable == ptr && p->data == *ptr) - return p; - - p = p->next; - } + bloc_ptr p; + + for (p = first_bloc; p != NIL_BLOC; p = p->next) + /* Consistency check. Don't return inconsistent blocs. + Don't abort here, as callers might be expecting this, but + callers that always expect a bloc to be returned should abort + if one isn't to avoid a memory corruption bug that is + difficult to track down. */ + if (p->variable == ptr && p->data == *ptr) + break; return p; } @@ -430,13 +423,13 @@ get_bloc (size_t size) static int relocate_blocs (bloc_ptr bloc, heap_ptr heap, void *address) { - bloc_ptr b = bloc; + bloc_ptr b; /* No need to ever call this if arena is frozen, bug somewhere! */ if (r_alloc_freeze_level) emacs_abort (); - while (b) + for (b = bloc; b; b = b->next) { /* If bloc B won't fit within HEAP, move to the next heap and try again. */ @@ -452,17 +445,13 @@ relocate_blocs (bloc_ptr bloc, heap_ptr heap, void *address) get enough new space to hold BLOC and all following blocs. */ if (heap == NIL_HEAP) { - bloc_ptr tb = b; + bloc_ptr tb; size_t s = 0; /* Add up the size of all the following blocs. */ - while (tb != NIL_BLOC) - { - if (tb->variable) - s += tb->size; - - tb = tb->next; - } + for (tb = b; tb != NIL_BLOC; tb = tb->next) + if (tb->variable) + s += tb->size; /* Get that space. */ address = obtain (address, s); @@ -477,7 +466,6 @@ relocate_blocs (bloc_ptr bloc, heap_ptr heap, void *address) b->new_data = address; if (b->variable) address = (char *) address + b->size; - b = b->next; } return 1; @@ -535,13 +523,11 @@ update_heap_bloc_correspondence (bloc_ptr bloc, heap_ptr heap) /* If there are any remaining heaps and no blocs left, mark those heaps as empty. */ - heap = heap->next; - while (heap) + for (heap = heap->next; heap; heap = heap->next) { heap->first_bloc = NIL_BLOC; heap->last_bloc = NIL_BLOC; heap->free = heap->bloc_start; - heap = heap->next; } } @@ -578,12 +564,9 @@ resize_bloc (bloc_ptr bloc, size_t size) /* Note that bloc could be moved into the previous heap. */ address = (bloc->prev ? (char *) bloc->prev->data + bloc->prev->size : (char *) first_heap->bloc_start); - while (heap) - { - if (heap->bloc_start <= address && address <= heap->end) - break; - heap = heap->prev; - } + for (; heap; heap = heap->next) + if (heap->bloc_start <= address && address <= heap->end) + break; if (! relocate_blocs (bloc, heap, address)) { @@ -1084,7 +1067,7 @@ r_alloc_check (void) if (pb && pb->data + pb->size != b->data) { assert (ph && b->data == h->bloc_start); - while (ph) + for (; ph; ph = ph->prev) { if (ph->bloc_start <= pb->data && pb->data + pb->size <= ph->end) @@ -1093,10 +1076,7 @@ r_alloc_check (void) break; } else - { - assert (ph->bloc_start + b->size > ph->end); - } - ph = ph->prev; + assert (ph->bloc_start + b->size > ph->end); } } pb = b; @@ -1120,18 +1100,14 @@ r_alloc_check (void) void r_alloc_reset_variable (void **old, void **new) { - bloc_ptr bloc = first_bloc; + bloc_ptr bloc; /* Find the bloc that corresponds to the data pointed to by pointer. find_bloc cannot be used, as it has internal consistency checks which fail when the variable needs resetting. */ - while (bloc != NIL_BLOC) - { - if (bloc->data == *new) - break; - - bloc = bloc->next; - } + for (bloc = first_bloc; bloc != NIL_BLOC; bloc = bloc->next) + if (bloc->data == *new) + break; if (bloc == NIL_BLOC || bloc->variable != old) emacs_abort (); /* Already freed? OLD not originally used to allocate? */ From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 07 03:30:12 2017 Received: (at 25332) by debbugs.gnu.org; 7 Jan 2017 08:30:12 +0000 Received: from localhost ([127.0.0.1]:45577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPmOC-0008MJ-Kw for submit@debbugs.gnu.org; Sat, 07 Jan 2017 03:30:12 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPmOA-0008FG-Ux for 25332@debbugs.gnu.org; Sat, 07 Jan 2017 03:30:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPmO1-0007vx-VZ for 25332@debbugs.gnu.org; Sat, 07 Jan 2017 03:30:05 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPmNs-0007ti-Ey; Sat, 07 Jan 2017 03:29:52 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1973 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cPmNr-0007fd-08; Sat, 07 Jan 2017 03:29:51 -0500 Date: Sat, 07 Jan 2017 10:30:12 +0200 Message-Id: <83wpe7b7cb.fsf@gnu.org> From: Eli Zaretskii To: Chris Gregory In-reply-to: <87h95hdg0w.fsf@gmail.com> (message from Chris Gregory on Mon, 02 Jan 2017 00:26:07 -0800) Subject: Re: bug#25332: [PATCH] Change while loops to for loops. References: <87h95hdg0w.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.2 (--------) X-Debbugs-Envelope-To: 25332 Cc: 25332@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.2 (--------) tags 25332 notabug close 25332 thanks > From: Chris Gregory > Date: Mon, 02 Jan 2017 00:26:07 -0800 > > This patch changes while loops to for loops to make the code more > consistent. I don't think I understand the rationale. Why is using 'while' inconsistent? In any case, please don't bother making style changes in ralloc.c, as that file should almost never be used in Emacs, except in some marginal configurations, and we actually would like to get rid of it altogether. It's therefore a waste of effort to try to make its style better. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 08 16:24:52 2017 Received: (at 25332) by debbugs.gnu.org; 8 Jan 2017 21:24:52 +0000 Received: from localhost ([127.0.0.1]:47172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQKxP-0004wl-Ns for submit@debbugs.gnu.org; Sun, 08 Jan 2017 16:24:52 -0500 Received: from mail-io0-f178.google.com ([209.85.223.178]:35578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQKxO-0004wZ-NL for 25332@debbugs.gnu.org; Sun, 08 Jan 2017 16:24:51 -0500 Received: by mail-io0-f178.google.com with SMTP id j18so21865825ioe.2 for <25332@debbugs.gnu.org>; Sun, 08 Jan 2017 13:24:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=aE0H/ibT/YODJ8Ars3HTjIaF1GwUKN4B7D59Np1cJ1c=; b=PZV2pi3WjLhOAbeRjaJUUBivRXda9JlnNiFf+Kv8Kktf3cdE/1vDqgi7IT1w7VsL3+ n1vov+irZN5gHsaLcCTjlTey8Yki7kTN59jTlqoUpAuDC9YKXaqxk/P1GPLk188On9/U FsOljceic9vJSrea9lTUnaZFpf/gBNpc6Eipk8Rai/5NLmic58eaYpTaE95URKlWCi0m RfVish1iaeTqG4S6FOvTlBPmY7bYmdRgQbafkfdOXIkPOxzMW+bwfvGKwwbf3KUEc2DJ Yfb7xlJAptVloBZBJUDFrBt9/iXMpJDLecSzOMgmVNzFI54niQrmsDwjMIyIeBI9K6f6 TDbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=aE0H/ibT/YODJ8Ars3HTjIaF1GwUKN4B7D59Np1cJ1c=; b=paTcbYoduMrmc7j340HwTCkx/guxKBFu/1mpcxLdoxJRAubmnYX3c8ec+/bI8ewdhl GdnxsKPOUdXAaoTLpDLrQwPUqQe2lwAQp2gnWzHq4aUdsC9xWki1nMZqmXg5oCmsRNOv /fRJxFryDAPYrtAv+GUYidtnIesdY9hpDMs0lDqroAhMbwpw465O+ODLCLCBozC/pOyr SOvBaziSiTOgEPQMQAjAiob45aHM7FgCJNA21xO1TEYByrHCUohYzOAIsz0T8yWi+BRe k/+vZCtaWN1JT04zEAN2j4PULB3tusKnq2wGGD76Krv68zaJetKQROXJX2vs3WZSRnHL E7XQ== X-Gm-Message-State: AIkVDXLpqk/Eaf0JXZVHfQ40PakyyhQXn2VRBYNw7OQy5ajqtYN0UdT/jpaKC5a2tLCccw1+PQiSfCaqcIhuVQ== X-Received: by 10.107.195.204 with SMTP id t195mr65348938iof.46.1483910685090; Sun, 08 Jan 2017 13:24:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.191.197 with HTTP; Sun, 8 Jan 2017 13:24:04 -0800 (PST) In-Reply-To: <83wpe7b7cb.fsf@gnu.org> References: <87h95hdg0w.fsf@gmail.com> <83wpe7b7cb.fsf@gnu.org> From: Chris Gregory Date: Sun, 8 Jan 2017 13:24:04 -0800 Message-ID: Subject: Re: bug#25332: [PATCH] Change while loops to for loops. To: Eli Zaretskii Content-Type: multipart/alternative; boundary=94eb2c189cee436a7e05459be15e X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 25332 Cc: 25332@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) --94eb2c189cee436a7e05459be15e Content-Type: text/plain; charset=UTF-8 There are places in ralloc.c where a for loop is used to express a loop, and places where a while loop is used with the increment operation at the end of it. This would just simplify all code so that it was consistently using a for loop for this purpose. Without this patch here is a good usage of for: heap_ptr heap; for (heap = last_heap; heap; heap = heap->prev) { if (heap->start <= address && address <= heap->end) return heap; } Here is a usage of while that should be a for loop like the previous example: bloc_ptr p = first_bloc; while (p != NIL_BLOC) { /* Consistency check. Don't return inconsistent blocs. Don't abort here, as callers might be expecting this, but callers that always expect a bloc to be returned should abort if one isn't to avoid a memory corruption bug that is difficult to track down. */ if (p->variable == ptr && p->data == *ptr) return p; p = p->next; } Recommended new code: bloc_ptr p; for (p = first_bloc; p != NIL_BLOC; p = p->next) { /* Consistency check. Don't return inconsistent blocs. Don't abort here, as callers might be expecting this, but callers that always expect a bloc to be returned should abort if one isn't to avoid a memory corruption bug that is difficult to track down. */ if (p->variable == ptr && p->data == *ptr) return p; } This style exact loop is even used later on (line 509 in update_heap_bloc_correspondence()): /* Advance through blocs one by one. */ for (b = bloc; b != NIL_BLOC; b = b->next) -- Chris Gregory On Sat, Jan 7, 2017 at 12:30 AM, Eli Zaretskii wrote: > tags 25332 notabug > close 25332 > thanks > > > From: Chris Gregory > > Date: Mon, 02 Jan 2017 00:26:07 -0800 > > > > This patch changes while loops to for loops to make the code more > > consistent. > > I don't think I understand the rationale. Why is using 'while' > inconsistent? > > In any case, please don't bother making style changes in ralloc.c, as > that file should almost never be used in Emacs, except in some > marginal configurations, and we actually would like to get rid of it > altogether. It's therefore a waste of effort to try to make its style > better. > --94eb2c189cee436a7e05459be15e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
There are places in ralloc.c where a for loop is used to e= xpress a loop, and places where a while loop is used with the increment ope= ration at the end of it.=C2=A0 This would just simplify all code so that it= was consistently using a for loop for this purpose.

Wit= hout this patch here is a good usage of for:

= =C2=A0 heap_ptr heap;

=C2=A0 for (heap = =3D last_heap; heap; heap =3D heap->prev)
=C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 if (heap->start <=3D address && ad= dress <=3D heap->end)
return heap;
=C2=A0 =C2=A0 }

Here is a usage of while that should be a for = loop like the previous example:

=C2=A0 bloc_p= tr p =3D first_bloc;

=C2=A0 while (p !=3D NIL_BLOC= )
=C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 /* Consistency c= heck. Don't return inconsistent blocs.
Don't abort here, as = callers might be expecting this, but
callers that always expect a bl= oc to be returned should abort
if one isn't to avoid a memory co= rruption bug that is
difficult to track down. =C2=A0*/
= =C2=A0 =C2=A0 =C2=A0 if (p->variable =3D=3D ptr && p->data = =3D=3D *ptr)
return p;

=C2=A0 =C2=A0 =C2=A0 = p =3D p->next;
=C2=A0 =C2=A0 }

= Recommended new code:

=C2=A0 bloc_ptr p;

=C2=A0 for (p =3D first_bloc; p !=3D NIL_BLOC; p =3D p= ->next)
=C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 /* Cons= istency check. Don't return inconsistent blocs.
Don't abor= t here, as callers might be expecting this, but
callers that always = expect a bloc to be returned should abort
if one isn't to avoid = a memory corruption bug that is
difficult to track down. =C2=A0*/
=C2=A0 =C2=A0 =C2=A0 if (p->variable =3D=3D ptr && p->= ;data =3D=3D *ptr)
return p;
=C2=A0 =C2=A0 }

This style exact loop is even used later on (line 509 in u= pdate_heap_bloc_correspondence()):

=C2=A0 /* = Advance through blocs one by one. =C2=A0*/
=C2=A0 for (b =3D bloc= ; b !=3D NIL_BLOC; b =3D b->next)

--=C2=A0
Chris Gregory
=

On Sat, Jan 7, 2017 at 12:30 AM, Eli Zaretsk= ii <= eliz@gnu.org> wrote:
tags 2= 5332 notabug
close 25332
thanks

> From: Chris Gregory <czipperz= @gmail.com>
> Date: Mon, 02 Jan 2017 00:26:07 -0800
>
> This patch changes while loops to for loops to make the code more
> consistent.

I don't think I understand the rationale.=C2=A0 Why is using 'while= '
inconsistent?

In any case, please don't bother making style changes in ralloc.c, as that file should almost never be used in Emacs, except in some
marginal configurations, and we actually would like to get rid of it
altogether.=C2=A0 It's therefore a waste of effort to try to make its s= tyle
better.

--94eb2c189cee436a7e05459be15e-- From unknown Sat Aug 16 15:58:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 06 Feb 2017 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator