[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] fixing the tickle (was: Smooth Horizontal Scroll patch)
From: |
Mark Majeres |
Subject: |
Re: [Nano-devel] fixing the tickle (was: Smooth Horizontal Scroll patch) |
Date: |
Tue, 20 May 2014 06:30:21 -0700 |
Benno,
The line that I initially noticed was from text.c.
data = (char *) nrealloc((void *) u->strdata, len * sizeof(char *));
There is a macro named charealloc that is usually used for this situation.
#define charealloc(ptr, howmuch) (char *)nrealloc(ptr, (howmuch) * sizeof(char))
Not really a problem, there is just more memory being allocated than needed.
I think there is only one more case similar to the above, it's in do_lockfile()
Otherwise, it does look like sizeof(char*) applies. I usually create
a #define for this situation to clarify that it's not a mistake.
#define SIZEOF_PTR sizeof(void*)
-Mark
- [Nano-devel] Smooth Horizontal Scroll patch, Mark Majeres, 2014/05/15
- Re: [Nano-devel] Smooth Horizontal Scroll patch, Benno Schulenberg, 2014/05/15
- Re: [Nano-devel] Smooth Horizontal Scroll patch, Mark Majeres, 2014/05/18
- Re: [Nano-devel] Smooth Horizontal Scroll patch, Benno Schulenberg, 2014/05/18
- Re: [Nano-devel] Smooth Horizontal Scroll patch, Mark Majeres, 2014/05/19
- Re: [Nano-devel] fixing the tickle (was: Smooth Horizontal Scroll patch), Benno Schulenberg, 2014/05/19
- Re: [Nano-devel] fixing the tickle (was: Smooth Horizontal Scroll patch), Mark Majeres, 2014/05/19
- Re: [Nano-devel] fixing the tickle (was: Smooth Horizontal Scroll patch), Benno Schulenberg, 2014/05/20
- Re: [Nano-devel] fixing the tickle (was: Smooth Horizontal Scroll patch),
Mark Majeres <=
- Re: [Nano-devel] Smooth Horizontal Scroll patch, Mark Majeres, 2014/05/21
- Re: [Nano-devel] Smooth Horizontal Scroll patch (failing to update screen after where-is-next), Benno Schulenberg, 2014/05/21
- Re: [Nano-devel] Smooth Horizontal Scroll patch (failing to update screen after where-is-next), Mark Majeres, 2014/05/22
- Re: [Nano-devel] Smooth Horizontal Scroll patch (failing to update screen after where-is-next), Benno Schulenberg, 2014/05/22