From db27dadf2791a6ba60c843272d8c5059c0f4300c Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Sun, 12 Dec 1999 10:53:45 +0000 Subject: Call SLS_FETCH() only, if it is needed --- ext/gd/gd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ext/gd') diff --git a/ext/gd/gd.c b/ext/gd/gd.c index ec3e10eaed..7296b3e919 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -601,13 +601,14 @@ PHP_FUNCTION(imagegif ) output = php3_header(); if (output) { - SLS_FETCH(); - gdImageGif (im, tmp); fseek(tmp, 0, SEEK_SET); #if APACHE && defined(CHARSET_EBCDIC) - /* This is a binary file already: avoid EBCDIC->ASCII conversion */ - ap_bsetflag(((request_rec *) SG(server_context))->connection->client, B_EBCDIC2ASCII, 0); + { + SLS_FETCH(); + /* This is a binary file already: avoid EBCDIC->ASCII conversion */ + ap_bsetflag(((request_rec *) SG(server_context))->connection->client, B_EBCDIC2ASCII, 0); + } #endif while ((b = fread(buf, 1, sizeof(buf), tmp)) > 0) { php3_write(buf, b); -- cgit v1.2.1