[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fix a small memory leak

From: Bruno Haible
Subject: Re: fix a small memory leak
Date: Sun, 28 Jun 2020 15:35:03 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-179-generic; KDE/5.18.0; x86_64; ; )

Hi José,

> Yeah I agree regarding continue vs. if.

You shouldn't have said this :-) Because now I'm proposing a patch that
eliminates most 'continue;' statements.

The maintainability benefit is that when in the future a developer wants
to insert additional code near the end of a loop, they need to ask themselves
"inside or outside the 'if' block?" Thus a decision where to put code becomes
explicit. With 'continue', the programmer is often not aware that they have
a choice.


Attachment: 0001-Improve-code-maintainability-Avoid-continue-statemen.patch
Description: Text Data

Attachment: continue-diff-w.diff
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]