~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/ut/ut0mem.c

  • Committer: Monty Taylor
  • Date: 2010-11-25 01:53:19 UTC
  • mto: (1953.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1955.
  • Revision ID: mordred@inaugust.com-20101125015319-ia85msn25uemopgc
Re-enabled -Wformat and then cleaned up the carnage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
 
181
181
                /* Make an intentional seg fault so that we get a stack
182
182
                trace */
 
183
                /* Intentional segfault on NetWare causes an abend. Avoid this
 
184
                by graceful exit handling in ut_a(). */
 
185
#if (!defined __NETWARE__)
183
186
                if (assert_on_error) {
184
187
                        ut_print_timestamp(stderr);
185
188
 
192
195
                } else {
193
196
                        return(NULL);
194
197
                }
 
198
#else
 
199
                ut_a(0);
 
200
#endif
195
201
        }
196
202
 
197
203
        if (set_to_zero) {
285
291
#endif /* !UNIV_HOTBACKUP */
286
292
 
287
293
/**********************************************************************//**
288
 
Frees a memory block allocated with ut_malloc. Freeing a NULL pointer is
289
 
a nop. */
 
294
Frees a memory block allocated with ut_malloc. */
290
295
UNIV_INTERN
291
296
void
292
297
ut_free(
293
298
/*====*/
294
 
        void* ptr)  /*!< in, own: memory block, can be NULL */
 
299
        void* ptr)  /*!< in, own: memory block */
295
300
{
296
301
#ifndef UNIV_HOTBACKUP
297
302
        ut_mem_block_t* block;
298
303
 
299
 
        if (ptr == NULL) {
300
 
                return;
301
 
        } else if (UNIV_LIKELY(srv_use_sys_malloc)) {
 
304
        if (UNIV_LIKELY(srv_use_sys_malloc)) {
302
305
                free(ptr);
303
306
                return;
304
307
        }