intel/fs: Implement nir_intrinsic_load_global_constant
[mesa.git] / src / glx / XF86dri.c
index 8f53bd71953c028a2499cf8f671f12ee9e598f4a..885ec93db5520486b323f0d0b892492b2ffa1582 100644 (file)
@@ -29,7 +29,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 /*
  * Authors:
  *   Kevin E. Martin <martin@valinux.com>
- *   Jens Owen <jens@tungstengraphics.com>
+ *   Jens Owen <jowen@vmware.com>
  *   Rickard E. (Rik) Faith <faith@valinux.com>
  *
  */
@@ -305,9 +305,11 @@ XF86DRIGetClientDriverName(Display * dpy, int screen,
    *ddxDriverPatchVersion = rep.ddxDriverPatchVersion;
 
    if (rep.length) {
-      if (!
-          (*clientDriverName =
-           calloc(rep.clientDriverNameLength + 1, 1))) {
+      if (rep.clientDriverNameLength < INT_MAX)
+         *clientDriverName = calloc(rep.clientDriverNameLength + 1, 1);
+      else
+         *clientDriverName = NULL;
+      if (*clientDriverName == NULL) {
          _XEatData(dpy, ((rep.clientDriverNameLength + 3) & ~3));
          UnlockDisplay(dpy);
          SyncHandle();
@@ -438,7 +440,7 @@ XF86DRIDestroyDrawable(Display * dpy, int screen, XID drawable)
     *     destroyDrawable(drawable);
     *
     * which is a textbook race condition - the window may disappear
-    * from the server between checking for its existance and
+    * from the server between checking for its existence and
     * destroying it.  Instead we change the semantics of
     * __DRIinterfaceMethodsRec::destroyDrawable() to succeed even if
     * the windows is gone, by wrapping the destroy call in an error