diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2007-07-13 10:44:29 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2007-07-13 10:44:29 +0200 |
commit | 4e02941bf4dfd57c928e911445a8a51f15bce215 (patch) | |
tree | c407e138e271d56020ec11ab018f9f9fb9542d62 /common | |
parent | fe551ed81d26cf73ccdcdec65872b8a8c1f69d7d (diff) |
add const and add FIXME about a to-be-fixed race condition
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@301 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'common')
-rw-r--r-- | common/tio.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/tio.c b/common/tio.c index 9ddc6bc..9ba7fc7 100644 --- a/common/tio.c +++ b/common/tio.c @@ -273,6 +273,10 @@ int tio_flush(TFILE *fp) /* check write buffer presence */ if (fp->writebuffer==NULL) return 0; +/* +FIXME: we have a race condition here (setting and restoring the signal mask), this is a critical region that should be locked +*/ + /* set up sigaction */ memset(&act,0,sizeof(struct sigaction)); act.sa_handler=SIG_IGN; @@ -312,7 +316,7 @@ int tio_flush(TFILE *fp) int tio_write(TFILE *fp, const void *buf, size_t count) { size_t fr; - uint8_t *ptr=(const uint8_t *)buf; + const uint8_t *ptr=(const uint8_t *)buf; /* ensure that we have a write buffer */ if (fp->writebuffer==NULL) { |