Re: [PATCH] dyn_array: using %pF instead of print_fn_descriptor_symbol

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Friday, August 29, 2008 - 3:20 pm

On Fri, 29 Aug 2008 15:07:49 -0700
Yinghai Lu <yhlu.kernel@gmail.com> wrote:


This:

struct dyn_array {
	void **name;

is a bit confusing.  One normally expects a variable called "name" to
point at a character string.

What _does_ this thing point at?  There are no code comments which I
can find, it's unobvious from the source code, the type is the
information-free void** and the identifier is misleading.

I find that documenting the data structures is the best way of making
code understandable (and hence maintainable).

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] dyn_array: using %pF instead of print_fn_descr ..., Andrew Morton, (Fri Aug 29, 3:20 pm)