diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2010-04-30 07:00:58 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2010-04-30 07:00:58 +0000 |
commit | 000e6ad3dea9fe04759c7d27ea9ae500eccdc4bc (patch) | |
tree | a8afaa98c8beab93ea2d383fba9b01ed6821946e /render/box.h | |
parent | b579b0deb39c067f19bebcb4acfb29d7ef87f258 (diff) | |
download | netsurf-000e6ad3dea9fe04759c7d27ea9ae500eccdc4bc.tar.gz netsurf-000e6ad3dea9fe04759c7d27ea9ae500eccdc4bc.tar.bz2 |
It turns out that realloc(ptr, 0) --> free(ptr) is not actually required by the C standard (whereas realloc(NULL, size) --> malloc(size) is).
Therefore, explicitly model the behaviour expected by our libraries (that realloc of 0 size is equivalent to free).
svn path=/trunk/netsurf/; revision=10524
Diffstat (limited to 'render/box.h')
-rw-r--r-- | render/box.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/render/box.h b/render/box.h index d1a1994f1..b6e344af1 100644 --- a/render/box.h +++ b/render/box.h @@ -294,7 +294,7 @@ extern const char *TARGET_BLANK; #define UNKNOWN_WIDTH INT_MAX #define UNKNOWN_MAX_WIDTH INT_MAX - +void *box_style_alloc(void *ptr, size_t len, void *pw); struct box * box_create(css_computed_style *style, bool style_owned, char *href, const char *target, char *title, char *id, void *context); |