summaryrefslogtreecommitdiffstats
path: root/libtomcrypt/misc
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-09-06 17:20:33 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-09-06 17:26:58 +0200
commite6177630198eb1eea2def0374fae1196da0e40ec (patch)
tree704951804609999fb6ef7a956b04921b9f84c320 /libtomcrypt/misc
parent943f9ab50c110133a5cd1118b5b19cb09301168f (diff)
downloadcryptodev-linux-e6177630198eb1eea2def0374fae1196da0e40ec.tar.gz
cryptodev-linux-e6177630198eb1eea2def0374fae1196da0e40ec.tar.xz
cryptodev-linux-e6177630198eb1eea2def0374fae1196da0e40ec.zip
Run Lindent on libtom(*)
Diffstat (limited to 'libtomcrypt/misc')
-rw-r--r--libtomcrypt/misc/crypt/crypt_argchk.c5
-rw-r--r--libtomcrypt/misc/pk_get_oid.c33
-rw-r--r--libtomcrypt/misc/zeromem.c10
3 files changed, 23 insertions, 25 deletions
diff --git a/libtomcrypt/misc/crypt/crypt_argchk.c b/libtomcrypt/misc/crypt/crypt_argchk.c
index 143b784..a1fe682 100644
--- a/libtomcrypt/misc/crypt/crypt_argchk.c
+++ b/libtomcrypt/misc/crypt/crypt_argchk.c
@@ -13,13 +13,12 @@
/**
@file crypt_argchk.c
Perform argument checking, Tom St Denis
-*/
+*/
#if (ARGTYPE == 0)
void crypt_argchk(char *v, char *s, int d)
{
- printk("LTC_ARGCHK '%s' failure on line %d of file %s\n",
- v, d, s);
+ printk("LTC_ARGCHK '%s' failure on line %d of file %s\n", v, d, s);
}
#endif
diff --git a/libtomcrypt/misc/pk_get_oid.c b/libtomcrypt/misc/pk_get_oid.c
index 197d7ae..7b2803f 100644
--- a/libtomcrypt/misc/pk_get_oid.c
+++ b/libtomcrypt/misc/pk_get_oid.c
@@ -10,31 +10,30 @@
#include "tomcrypt.h"
static const oid_st rsa_oid = {
- .OIDlen = 7,
- .OID = { 1, 2, 840, 113549, 1, 1, 1 },
+ .OIDlen = 7,
+ .OID = {1, 2, 840, 113549, 1, 1, 1},
};
static const oid_st dsa_oid = {
- .OIDlen = 6,
- .OID = { 1, 2, 840, 10040, 4, 1 },
+ .OIDlen = 6,
+ .OID = {1, 2, 840, 10040, 4, 1},
};
/*
Returns the OID of the public key algorithm.
@return CRYPT_OK if valid
*/
-int pk_get_oid(int pk, oid_st *st)
+int pk_get_oid(int pk, oid_st * st)
{
- switch (pk) {
- case PKA_RSA:
- memcpy(st, &rsa_oid, sizeof(*st));
- break;
- case PKA_DSA:
- memcpy(st, &dsa_oid, sizeof(*st));
- break;
- default:
- return CRYPT_INVALID_ARG;
- }
- return CRYPT_OK;
+ switch (pk) {
+ case PKA_RSA:
+ memcpy(st, &rsa_oid, sizeof(*st));
+ break;
+ case PKA_DSA:
+ memcpy(st, &dsa_oid, sizeof(*st));
+ break;
+ default:
+ return CRYPT_INVALID_ARG;
+ }
+ return CRYPT_OK;
}
-
diff --git a/libtomcrypt/misc/zeromem.c b/libtomcrypt/misc/zeromem.c
index a4bb124..812ccc3 100644
--- a/libtomcrypt/misc/zeromem.c
+++ b/libtomcrypt/misc/zeromem.c
@@ -22,11 +22,11 @@
*/
void zeromem(void *out, size_t outlen)
{
- unsigned char *mem = out;
- LTC_ARGCHKVD(out != NULL);
- while (outlen-- > 0) {
- *mem++ = 0;
- }
+ unsigned char *mem = out;
+ LTC_ARGCHKVD(out != NULL);
+ while (outlen-- > 0) {
+ *mem++ = 0;
+ }
}
/* $Source: /cvs/libtom/libtomcrypt/src/misc/zeromem.c,v $ */