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 | c5943fbb614d23909c9714fcd77f4298081a58e9 (patch) | |
tree | c63b7d130f4c45e67d872cb9a71727a7258aa851 /idlc/source | |
parent | d186c1ce5a516c7dca6e985b1dcfedaf29230c8c (diff) |
cmcfixes75: #i111795# check write return value
Diffstat (limited to 'idlc/source')
-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 e1cabf438..b8dbd45c5 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; } } |