xserver: Branch 'master' - 4 commits

Keith Packard keithp at kemper.freedesktop.org
Wed Nov 10 14:41:40 PST 2010


 os/log.c |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

New commits:
commit acba00c0c1129fe4ef7655f018cd21dbb1ee9a1f
Merge: 383dfe2... 44e8165...
Author: Keith Packard <keithp at keithp.com>
Date:   Wed Nov 10 14:41:08 2010 -0800

    Merge remote branch 'dottedmag/master'

commit 44e81654147065b7b907ce0d14fdc2e74a638f79
Author: Mikhail Gusarov <dottedmag at dottedmag.net>
Date:   Mon Oct 25 01:30:33 2010 +0400

    Remove now-misleading comment
    
    Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/os/log.c b/os/log.c
index d18f9b3..76b6b84 100644
--- a/os/log.c
+++ b/os/log.c
@@ -177,7 +177,6 @@ LogInit(const char *fname, const char *backup)
     char *logFileName = NULL;
 
     if (fname && *fname) {
-	/* malloc() can't be used yet. */
 	logFileName = malloc(strlen(fname) + strlen(display) + 1);
 	if (!logFileName)
 	    FatalError("Cannot allocate space for the log file name\n");
commit 433dddcf29d257310e95e4215dceef8b0b976e2d
Author: Mikhail Gusarov <dottedmag at dottedmag.net>
Date:   Mon Oct 25 01:28:38 2010 +0400

    Replace "if(buf) realloc(buf, size) else malloc(size)" with realloc()
    
    Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/os/log.c b/os/log.c
index 3435da6..d18f9b3 100644
--- a/os/log.c
+++ b/os/log.c
@@ -305,10 +305,7 @@ LogVWrite(int verb, const char *f, va_list args)
 	    if (len > bufferUnused) {
 		bufferSize += 1024;
 		bufferUnused += 1024;
-		if (saveBuffer)
-		    saveBuffer = realloc(saveBuffer, bufferSize);
-		else
-		    saveBuffer = malloc(bufferSize);
+		saveBuffer = realloc(saveBuffer, bufferSize);
 		if (!saveBuffer)
 		    FatalError("realloc() failed while saving log messages\n");
 	    }
commit 04a04e162886ca9bc3977d3a7509def876487921
Author: Mikhail Gusarov <dottedmag at dottedmag.net>
Date:   Mon Oct 25 01:27:46 2010 +0400

    Remove now-misleading comment
    
    Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/os/log.c b/os/log.c
index ee4b45f..3435da6 100644
--- a/os/log.c
+++ b/os/log.c
@@ -302,10 +302,6 @@ LogVWrite(int verb, const char *f, va_list args)
 #endif
 	    }
 	} else if (needBuffer) {
-	    /*
-	     * Note, this code is used before OsInit() has been called, so
-	     * malloc() and friends can't be used.
-	     */
 	    if (len > bufferUnused) {
 		bufferSize += 1024;
 		bufferUnused += 1024;


More information about the xorg-commit mailing list