Bug#333565: glibc-doc: Hooks for Malloc example code bug (info pages)
Package: glibc-doc
Version: 2.3.5-6
Severity: minor
Tags: patch
Hello, this is a (very very very) small issue (small in ascii, but large in C/C++). In the libc info pages ( type info libc, /mtrac, scroll down to "*not Hooks for Malloc::" and press enter. In this page the prototypes are defined and explained. A certain prototype here is the one for "__free_hook" which is:
void FUNCTION (void *PTR, const void *CALLER)
Lower on the page there is some example code:
static void *
my_free_hook (void *ptr, const void *caller)
{
/* Restore all old hooks */
__malloc_hook = old_malloc_hook;
__free_hook = old_free_hook;
/* Call recursively */
So in this case you define a new function for free returning a pointer (to void) while it should simply return void (as the prototype defines). So in this case the patch is simply removing the * which is located in manual/memory.texi or as diff would say:
qntal:/tmp/glibc-2.3.5/glibc-2.3.5/manual# diff memory.texi.old memory.texi
987c987
< static void *
---
> static void
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12.5
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
-- no debconf information
Reply to: