From 7b454358082fc07985878fc92b902d7534144cae Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat, 12 Mar 2016 10:54:22 -0800
Subject: When checking malloc for success, it helps to use == NULL, instead of
 =

Fixes gcc 5.3 compiler warning:
s3_bios.c: In function 'find_bios_string':
s3_bios.c:49:2: warning: suggest parentheses around assignment used as
    truth value [-Wparentheses]
  if (bios = NULL)
    ^

[Tested by compiling only, as I have no S3 hardware, but clearly no one
 else has tested this code since commit c41a1188ce53 in 2009, as it would
 be segfaulting if run.]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/s3_bios.c b/src/s3_bios.c
index 323e2ce..1c7c5fe 100644
--- src/s3_bios.c
+++ src/s3_bios.c
@@ -46,7 +46,7 @@ static unsigned char *find_bios_string(ScrnInfoPtr pScrn, int BIOSbase,
 	S3Ptr pS3 = S3PTR(pScrn);
 
 	bios = malloc(BIOS_BSIZE);
-	if (bios = NULL)
+	if (bios == NULL)
 		return NULL;
 
 	if (!init) {
-- 
cgit v0.10.2

