diff options
author | jbj <devnull@localhost> | 2001-10-13 19:35:58 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-10-13 19:35:58 +0000 |
commit | 525f4cb8b1317120c36a75f47f796d285f69078c (patch) | |
tree | 072477496ea72f2f9fb3d8c877eea8dd5078975c /beecrypt | |
parent | 2d312d19c14300224ea85ea4fd62a0844d1af573 (diff) | |
download | rpm-525f4cb8b1317120c36a75f47f796d285f69078c.tar.gz rpm-525f4cb8b1317120c36a75f47f796d285f69078c.tar.bz2 rpm-525f4cb8b1317120c36a75f47f796d285f69078c.zip |
- ratchet up to lclint "strict" level.
CVS patchset: 5104
CVS date: 2001/10/13 19:35:58
Diffstat (limited to 'beecrypt')
-rw-r--r-- | beecrypt/config.gnu.h.in | 4 | ||||
-rw-r--r-- | beecrypt/entropy.c | 18 | ||||
-rw-r--r-- | beecrypt/fips186.c | 12 | ||||
-rw-r--r-- | beecrypt/mtprng.c | 12 | ||||
-rw-r--r-- | beecrypt/rsa.c | 3 |
5 files changed, 46 insertions, 3 deletions
diff --git a/beecrypt/config.gnu.h.in b/beecrypt/config.gnu.h.in index d33dbd846..bf2818f3b 100644 --- a/beecrypt/config.gnu.h.in +++ b/beecrypt/config.gnu.h.in @@ -193,8 +193,12 @@ #undef HAVE_LIBTHREAD /* Name of package */ +#if !defined(PACKAGE) #undef PACKAGE +#endif /* Version number of package */ +#if !defined(VERSION) #undef VERSION +#endif diff --git a/beecrypt/entropy.c b/beecrypt/entropy.c index 731d95491..a4f21b1bf 100644 --- a/beecrypt/entropy.c +++ b/beecrypt/entropy.c @@ -1323,8 +1323,10 @@ int entropy_dev_dsp(uint32 *data, int size) if (mutex_lock(&dev_dsp_lock)) return -1; # elif HAVE_PTHREAD_H + /*@-moduncon@*/ if (pthread_mutex_lock(&dev_dsp_lock)) return -1; + /*@=moduncon@*/ # endif #endif @@ -1432,7 +1434,9 @@ dev_dsp_end: # if HAVE_SYNCH_H mutex_unlock(&dev_dsp_lock); # elif HAVE_PTHREAD_H - pthread_mutex_unlock(&dev_dsp_lock); + /*@-moduncon@*/ + (void) pthread_mutex_unlock(&dev_dsp_lock); + /*@=moduncon@*/ # endif #endif @@ -1454,8 +1458,10 @@ int entropy_dev_random(uint32* data, int size) if (mutex_lock(&dev_random_lock)) return -1; # elif HAVE_PTHREAD_H + /*@-moduncon@*/ if (pthread_mutex_lock(&dev_random_lock)) return -1; + /*@=moduncon@*/ # endif #endif @@ -1477,7 +1483,9 @@ dev_random_end: # if HAVE_SYNCH_H mutex_unlock(&dev_random_lock); # elif HAVE_PTHREAD_H + /*@-moduncon@*/ (void) pthread_mutex_unlock(&dev_random_lock); + /*@=moduncon@*/ # endif #endif return rc; @@ -1498,8 +1506,10 @@ int entropy_dev_urandom(uint32* data, int size) if (mutex_lock(&dev_urandom_lock)) return -1; # elif HAVE_PTHREAD_H + /*@-moduncon@*/ if (pthread_mutex_lock(&dev_urandom_lock)) return -1; + /*@=moduncon@*/ # endif #endif @@ -1521,7 +1531,9 @@ dev_urandom_end: # if HAVE_SYNCH_H mutex_unlock(&dev_urandom_lock); # elif HAVE_PTHREAD_H + /*@-moduncon@*/ (void) pthread_mutex_unlock(&dev_urandom_lock); + /*@=moduncon@*/ # endif #endif return rc; @@ -1540,8 +1552,10 @@ int entropy_dev_tty(uint32* data, int size) if (mutex_lock(&dev_tty_lock)) return -1; # elif HAVE_PTHREAD_H + /*@-moduncon@*/ if (pthread_mutex_lock(&dev_tty_lock)) return -1; + /*@=moduncon@*/ # endif #endif @@ -1562,7 +1576,9 @@ dev_tty_end: # if HAVE_SYNCH_H mutex_unlock(&dev_tty_lock); # elif HAVE_PTHREAD_H + /*@-moduncon@*/ (void) pthread_mutex_unlock(&dev_tty_lock); + /*@=moduncon@*/ # endif #endif diff --git a/beecrypt/fips186.c b/beecrypt/fips186.c index 761e89f38..bf0fa59df 100644 --- a/beecrypt/fips186.c +++ b/beecrypt/fips186.c @@ -67,8 +67,10 @@ int fips186Setup(fips186Param* fp) return -1; # elif defined(HAVE_PTHREAD_H) /*@-nullpass@*/ + /*@-moduncon@*/ if (pthread_mutex_init(&fp->lock, (pthread_mutexattr_t *) 0)) return -1; + /*@=moduncon@*/ /*@=nullpass@*/ # endif # endif @@ -94,8 +96,10 @@ int fips186Seed(fips186Param* fp, const uint32* data, int size) if (mutex_lock(&fp->lock)) return -1; # elif defined(HAVE_PTHREAD_H) + /*@-moduncon@*/ if (pthread_mutex_lock(&fp->lock)) return -1; + /*@=moduncon@*/ # endif # endif #endif @@ -110,8 +114,10 @@ int fips186Seed(fips186Param* fp, const uint32* data, int size) if (mutex_unlock(&fp->lock)) return -1; # elif defined(HAVE_PTHREAD_H) + /*@-moduncon@*/ if (pthread_mutex_unlock(&fp->lock)) return -1; + /*@=moduncon@*/ # endif # endif #endif @@ -133,8 +139,10 @@ int fips186Next(fips186Param* fp, uint32* data, int size) if (mutex_lock(&fp->lock)) return -1; # elif defined(HAVE_PTHREAD_H) + /*@-moduncon@*/ if (pthread_mutex_lock(&fp->lock)) return -1; + /*@=moduncon@*/ # endif # endif #endif @@ -171,8 +179,10 @@ int fips186Next(fips186Param* fp, uint32* data, int size) if (mutex_unlock(&fp->lock)) return -1; # elif defined(HAVE_PTHREAD_H) + /*@-moduncon@*/ if (pthread_mutex_unlock(&fp->lock)) return -1; + /*@=moduncon@*/ # endif # endif #endif @@ -194,8 +204,10 @@ int fips186Cleanup(fips186Param* fp) if (mutex_destroy(&fp->lock)) return -1; # elif defined(HAVE_PTHREAD_H) + /*@-moduncon@*/ if (pthread_mutex_destroy(&fp->lock)) return -1; + /*@=moduncon@*/ # endif # endif #endif diff --git a/beecrypt/mtprng.c b/beecrypt/mtprng.c index e6bda9c20..015f7d0da 100644 --- a/beecrypt/mtprng.c +++ b/beecrypt/mtprng.c @@ -92,8 +92,10 @@ int mtprngSetup(mtprngParam* mp) return -1; # elif defined(HAVE_PTHREAD_H) /*@-nullpass@*/ + /*@-moduncon@*/ if (pthread_mutex_init(&mp->lock, (pthread_mutexattr_t *) 0)) return -1; + /*@=moduncon@*/ /*@=nullpass@*/ # endif # endif @@ -122,8 +124,10 @@ int mtprngSeed(mtprngParam* mp, const uint32* data, int size) if (mutex_lock(&mp->lock)) return -1; # elif defined(HAVE_PTHREAD_H) + /*@-moduncon@*/ if (pthread_mutex_lock(&mp->lock)) return -1; + /*@=moduncon@*/ # endif # endif #endif @@ -143,8 +147,10 @@ int mtprngSeed(mtprngParam* mp, const uint32* data, int size) if (mutex_unlock(&mp->lock)) return -1; # elif defined(HAVE_PTHREAD_H) + /*@-moduncon@*/ if (pthread_mutex_unlock(&mp->lock)) return -1; + /*@=moduncon@*/ # endif # endif #endif @@ -168,8 +174,10 @@ int mtprngNext(mtprngParam* mp, uint32* data, int size) if (mutex_lock(&mp->lock)) return -1; # elif defined(HAVE_PTHREAD_H) + /*@-moduncon@*/ if (pthread_mutex_lock(&mp->lock)) return -1; + /*@=moduncon@*/ # endif # endif #endif @@ -195,8 +203,10 @@ int mtprngNext(mtprngParam* mp, uint32* data, int size) if (mutex_unlock(&mp->lock)) return -1; # elif defined(HAVE_PTHREAD_H) + /*@-moduncon@*/ if (pthread_mutex_unlock(&mp->lock)) return -1; + /*@=moduncon@*/ # endif # endif #endif @@ -218,8 +228,10 @@ int mtprngCleanup(mtprngParam* mp) if (mutex_destroy(&mp->lock)) return -1; # elif defined(HAVE_PTHREAD_H) + /*@-moduncon@*/ if (pthread_mutex_destroy(&mp->lock)) return -1; + /*@=moduncon@*/ # endif # endif #endif diff --git a/beecrypt/rsa.c b/beecrypt/rsa.c index 845dba774..177640b65 100644 --- a/beecrypt/rsa.c +++ b/beecrypt/rsa.c @@ -110,8 +110,7 @@ int rsapricrt(const rsakp* kp, const mp32number* m, mp32number* c) /*@=nullpass =nullptrarith @*/ /** - * returns: 1 if signature verifies - * 0 otherwise, can also indicate errors + * @return 1 if signature verifies, 0 otherwise (can also indicate errors) */ int rsavrfy(const rsapk* pk, const mp32number* m, const mp32number* c) { |