From: rrt Date: Fri, 14 Apr 2000 16:19:43 +0000 (+0000) Subject: [project @ 2000-04-14 16:19:43 by rrt] X-Git-Tag: Approximately_9120_patches~4684 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c75c2618208e388439fdbf6a63b6903ddff7e195;hp=fd9890ec70363703dd5071c8721d657a9416fd8e;p=ghc-hetmet.git [project @ 2000-04-14 16:19:43 by rrt] Set fo->bufSize even if it's 0. --- diff --git a/ghc/lib/std/cbits/setBuffering.c b/ghc/lib/std/cbits/setBuffering.c index 77d23dc..26bfd24 100644 --- a/ghc/lib/std/cbits/setBuffering.c +++ b/ghc/lib/std/cbits/setBuffering.c @@ -1,7 +1,7 @@ /* * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998 * - * $Id: setBuffering.c,v 1.7 2000/03/28 08:48:44 simonmar Exp $ + * $Id: setBuffering.c,v 1.8 2000/04/14 16:19:43 rrt Exp $ * * hSetBuffering Runtime Support */ @@ -122,9 +122,9 @@ setBuffering(StgForeignPtr ptr, StgInt size) fo->buf = malloc(size*sizeof(char)); if (fo->buf == NULL) { return -1; - } - fo->bufSize = size; + } } + fo->bufSize = size; #ifndef mingw32_TARGET_OS if (isaterm) {