diff options
author | marha <marha@users.sourceforge.net> | 2013-10-01 12:23:16 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-10-01 12:28:08 +0200 |
commit | 6dd755aa923291db2501cc5c22e409c41a70e3c1 (patch) | |
tree | fa88a321afc13657f7687a25d466f49151c9599a /libXaw/src/MultiSrc.c | |
parent | a5391fdea94a7b827069c6f926f83a235076ccb4 (diff) | |
download | vcxsrv-6dd755aa923291db2501cc5c22e409c41a70e3c1.tar.gz vcxsrv-6dd755aa923291db2501cc5c22e409c41a70e3c1.tar.bz2 vcxsrv-6dd755aa923291db2501cc5c22e409c41a70e3c1.zip |
Update following packages:
libXpm-3.5.11
libXaw-1.0.12
libXfont-1.4.6
libXrender-0.9.8
xproto-7.0.24
inputproto-2.3
xclock-1.0.7
xhost-1.0.6
Diffstat (limited to 'libXaw/src/MultiSrc.c')
-rw-r--r-- | libXaw/src/MultiSrc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libXaw/src/MultiSrc.c b/libXaw/src/MultiSrc.c index 148a17889..efa08b081 100644 --- a/libXaw/src/MultiSrc.c +++ b/libXaw/src/MultiSrc.c @@ -1092,15 +1092,18 @@ static Bool WriteToFile(String string, String name) { int fd; + Bool result = True; - if (((fd = creat(name, 0666)) == -1) - || (write(fd, string, strlen(string)) == -1)) + if ((fd = creat(name, 0666)) == -1) return (False); + if (write(fd, string, strlen(string)) == -1) + result = False; + if (close(fd) == -1) return (False); - return (True); + return (result); } @@ -1260,6 +1263,8 @@ InitStringOrFile(MultiSrcObject src, Bool newString) src->multi_src.length = (XawTextPosition)ftell(file); return(file); } + else + close(fd); } { String params[2]; |