LCDproc development and user support list

Text archives Help


[Lcdproc] [PATCH] MtxOrb.c for both 0.4.5 & 0.5


Chronological Thread 
  • From: joris AT robijn.net (Joris Robijn)
  • Subject: [Lcdproc] [PATCH] MtxOrb.c for both 0.4.5 & 0.5
  • Date: Wed Sep 15 19:20:02 2004

On 15 Sep 2004 at 20:06, Chris Lansley wrote:

>
> I'm fully aware of the comments in the configfile.h file - but this kind
> of
> interface is still asking for trouble, 1st because not everyone will look
> at those comments, and 2nd (based on the code I've seen) not every one who
> makes changes is a skilled programmer.

Every scheme has its own trouble. At least this leaves the responsibility
for cleaning up the string to the same file that allocated the string.
That's a good principle.

There have been enough trouble with programs that allocate space at place
X and don't deallocate it, or do that twice (resulting in a deallocation
of a different string that was much more recently allocated by an unknown
function and accidently resided at the same memory location)

Of course feeding a buffer and a maximum size to the config_* functions
would have been safe too, but then you have a limitation in size and a
less elegant function prototype.

Joris
--
Joris Robijn
<joris AT robijn.net>
Mobile: +31 6 288 41 964

// To understand recursion, we must first understand
recursion





Archive powered by MHonArc 2.6.18.

Top of page