diff options
author | Caolán McNamara <cmc@openoffice.org> | 2010-05-24 11:01:58 +0100 |
---|---|---|
committer | Caolán McNamara <cmc@openoffice.org> | 2010-05-24 11:01:58 +0100 |
commit | 44f61dccc4b92e203427e8b488cd6ad97308b271 (patch) | |
tree | 0f5d03d187668905cb7de26d4d25513cd5c64598 /idlc | |
parent | ab02afbd868c8cf629e1b4285ed1031e19afa123 (diff) |
cmcfixes75: #i111795# check write return value
Diffstat (limited to 'idlc')
-rw-r--r-- | idlc/source/preproc/tokens.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/idlc/source/preproc/tokens.c b/idlc/source/preproc/tokens.c index 6df35ae1f238..23ab88a5a9e3 100644 --- a/idlc/source/preproc/tokens.c +++ b/idlc/source/preproc/tokens.c @@ -474,7 +474,8 @@ void if (wbp >= &wbuf[OBS]) { - write(1, wbuf, OBS); + if (write(1, wbuf, OBS) != OBS) + error(ERROR, "short write!"); if (wbp > &wbuf[OBS]) memcpy(wbuf, wbuf + OBS, wbp - &wbuf[OBS]); wbp -= OBS; @@ -490,7 +491,8 @@ void { if (wbp > wbuf) { - write(1, wbuf, wbp - wbuf); + if (write(1, wbuf, wbp - wbuf) != wbp - wbuf) + error(ERROR, "short write!"); wbp = wbuf; } } |