diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2014-12-10 19:24:42 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2014-12-10 19:24:42 +0000 |
| commit | 377af4f1231f1e8856c27ee37eb1fdbeffc733bf (patch) | |
| tree | d4b8ab0e444704e8cc7b00b1c1a8268e2a58e84d /lib | |
| parent | bdc6b445064caf14f4c1be20f09050acde86232e (diff) | |
| parent | 85859dfe8f8a41c7e139984aaaecd3abdc58e20d (diff) | |
Notes
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libc/net/sctp_sys_calls.c | 2 | ||||
| -rw-r--r-- | lib/libc/stdio/fflush.c | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/libc/net/sctp_sys_calls.c b/lib/libc/net/sctp_sys_calls.c index 91527c353fce..ea66df9d886c 100644 --- a/lib/libc/net/sctp_sys_calls.c +++ b/lib/libc/net/sctp_sys_calls.c @@ -886,7 +886,7 @@ sctp_recvv(int sd, struct sctp_rcvinfo *rcvinfo; struct sctp_nxtinfo *nxtinfo; - if (((info != NULL) && (infolen == NULL)) | + if (((info != NULL) && (infolen == NULL)) || ((info == NULL) && (infolen != NULL) && (*infolen != 0)) || ((info != NULL) && (infotype == NULL))) { errno = EINVAL; diff --git a/lib/libc/stdio/fflush.c b/lib/libc/stdio/fflush.c index ef9b45b8b6f1..123167a09129 100644 --- a/lib/libc/stdio/fflush.c +++ b/lib/libc/stdio/fflush.c @@ -124,11 +124,13 @@ __sflush(FILE *fp) t = _swrite(fp, (char *)p, n); if (t <= 0) { /* Reset _p and _w. */ - if (p > fp->_p) /* Some was written. */ + if (p > fp->_p) { + /* Some was written. */ memmove(fp->_p, p, n); - fp->_p += n; - if ((fp->_flags & (__SLBF | __SNBF)) == 0) - fp->_w -= n; + fp->_p += n; + if ((fp->_flags & (__SLBF | __SNBF)) == 0) + fp->_w -= n; + } fp->_flags |= __SERR; return (EOF); } |
