diff options
author | marha <marha@users.sourceforge.net> | 2009-07-25 20:12:58 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-07-25 20:12:58 +0000 |
commit | 2553bdd7c359cd87525d367761c86932cec5adff (patch) | |
tree | ae71245933c98474a699d3e392de5820879b2018 /xorg-server/hw/dmx/glxProxy/glxext.c | |
parent | e2c51f2ee7b0a3ea1a052fc49324057b4a4bbc78 (diff) | |
parent | 4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05 (diff) | |
download | vcxsrv-2553bdd7c359cd87525d367761c86932cec5adff.tar.gz vcxsrv-2553bdd7c359cd87525d367761c86932cec5adff.tar.bz2 vcxsrv-2553bdd7c359cd87525d367761c86932cec5adff.zip |
svn merge file:///D:/svnrepos/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/hw/dmx/glxProxy/glxext.c')
-rw-r--r-- | xorg-server/hw/dmx/glxProxy/glxext.c | 59 |
1 files changed, 32 insertions, 27 deletions
diff --git a/xorg-server/hw/dmx/glxProxy/glxext.c b/xorg-server/hw/dmx/glxProxy/glxext.c index c40150d80..3a2488132 100644 --- a/xorg-server/hw/dmx/glxProxy/glxext.c +++ b/xorg-server/hw/dmx/glxProxy/glxext.c @@ -1,22 +1,32 @@ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. -** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ #ifdef HAVE_DMX_CONFIG_H #include <dmx-config.h> @@ -409,19 +419,17 @@ static int __glXDispatch(ClientPtr client) opcode = stuff->glxCode; cl = __glXClients[client->index]; if (!cl) { - cl = (__GLXclientState *) __glXMalloc(sizeof(__GLXclientState)); + cl = __glXCalloc(1, sizeof(__GLXclientState)); __glXClients[client->index] = cl; if (!cl) { return BadAlloc; } - memset(cl, 0, sizeof(__GLXclientState)); - cl->be_displays = (Display **) __glXMalloc( screenInfo.numScreens * sizeof(Display *) ); + cl->be_displays = __glXCalloc(screenInfo.numScreens, sizeof(Display *)); if (!cl->be_displays) { __glXFree( cl ); return BadAlloc; } - memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *)); } if (!cl->inUse) { @@ -463,20 +471,17 @@ static int __glXSwapDispatch(ClientPtr client) opcode = stuff->glxCode; cl = __glXClients[client->index]; if (!cl) { - cl = (__GLXclientState *) __glXMalloc(sizeof(__GLXclientState)); + cl = __glXCalloc(1, sizeof(__GLXclientState)); __glXClients[client->index] = cl; if (!cl) { return BadAlloc; } - memset(cl, 0, sizeof(__GLXclientState)); - cl->be_displays = (Display **) __glXMalloc( screenInfo.numScreens * sizeof(Display *) ); + cl->be_displays = __glXCalloc(screenInfo.numScreens, sizeof(Display *)); if (!cl->be_displays) { __glXFree( cl ); return BadAlloc; } - - memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *)); } if (!cl->inUse) { |