~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/Runtime/testcase/tstMemAutoPtr.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-01-30 23:27:25 UTC
  • mfrom: (0.3.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20110130232725-2ouajjd2ggdet0zd
Tags: 4.0.2-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Drop ubuntu-01-fix-build-gcc45.patch, fixed upstream.
* Drop ubuntu-02-as-needed.patch, added to the Debian package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: tstMemAutoPtr.cpp $ */
 
1
/* $Id: tstMemAutoPtr.cpp 31157 2010-07-28 03:15:35Z vboxsync $ */
2
2
/** @file
3
3
 * IPRT - Testcase the RTMemAutoPtr template.
4
4
 */
5
5
 
6
6
/*
7
 
 * Copyright (C) 2008 Oracle Corporation
 
7
 * Copyright (C) 2008-2010 Oracle Corporation
8
8
 *
9
9
 * This file is part of VirtualBox Open Source Edition (OSE), as
10
10
 * available from http://www.virtualbox.org. This file is free software;
113
113
}
114
114
 
115
115
 
116
 
void *tstMemAutoPtrAllocatorNoZero(void *pvOld, size_t cbNew)
 
116
void *tstMemAutoPtrAllocatorNoZero(void *pvOld, size_t cbNew, const char *pszTag)
117
117
{
118
 
    void *pvNew = RTMemRealloc(pvOld, cbNew);
 
118
    void *pvNew = RTMemReallocTag(pvOld, cbNew, pszTag);
119
119
    if (pvNew)
120
120
        memset(pvNew, 0xfe, cbNew);
121
121
    return pvNew;