From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] [DBUS-PATCH] cleanup
Date: Thu, 20 Oct 2005 11:07:56 +0200 [thread overview]
Message-ID: <1129799276.2241.39.camel@blade> (raw)
In-Reply-To: <1129541712.24835.59.camel@blade>
Hi Claudio,
> There are some programming styles in the code that we need to change,
> because this code is getting ugly otherwise.
here are some more coding style things I like to see. This is the bad
example:
for (i = 0; i < 10; i++) {
if (test_something()) {
do_something();
}
}
This will end up in some very nested loops. So the better way to write
it is this:
for (i = 0; i < 10; i++) {
if (!test_something())
continue;
do_something();
}
Please keep these things in mind when coding. It will make it a lot more
readable and understandable for outsiders.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
prev parent reply other threads:[~2005-10-20 9:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-14 14:03 [Bluez-devel] [DBUS-PATCH] cleanup Claudio Takahasi
2005-10-17 9:35 ` Marcel Holtmann
2005-10-20 9:07 ` Marcel Holtmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1129799276.2241.39.camel@blade \
--to=marcel@holtmann.org \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.