summaryrefslogtreecommitdiff
path: root/lib/mpi
diff options
context:
space:
mode:
authorDmitry Kasatkin <dmitry.kasatkin@intel.com>2012-01-26 19:13:16 +0200
committerJames Morris <jmorris@namei.org>2012-02-02 00:23:14 +1100
commit3cccd1543ab623a5065335bf08350e06ffc788ab (patch)
treee6f92704984d5390c22c3c0e165161ed2dc215ca /lib/mpi
parentc70c471c585a3fc1a10c792d5121b3803c83dde0 (diff)
downloadlinux-3.10-3cccd1543ab623a5065335bf08350e06ffc788ab.tar.gz
linux-3.10-3cccd1543ab623a5065335bf08350e06ffc788ab.tar.bz2
linux-3.10-3cccd1543ab623a5065335bf08350e06ffc788ab.zip
lib/mpi: replaced MPI_NULL with normal NULL
MPI_NULL is replaced with normal NULL. Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com> Reviewed-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'lib/mpi')
-rw-r--r--lib/mpi/mpicoder.c8
-rw-r--r--lib/mpi/mpiutil.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/mpi/mpicoder.c b/lib/mpi/mpicoder.c
index 6116fc4990d..d7684aa7f65 100644
--- a/lib/mpi/mpicoder.c
+++ b/lib/mpi/mpicoder.c
@@ -34,7 +34,7 @@ MPI do_encode_md(const void *sha_buffer, unsigned nbits)
uint8_t *frame, *fr_pt;
int i = 0, n;
size_t asnlen = DIM(asn);
- MPI a = MPI_NULL;
+ MPI a = NULL;
if (SHA1_DIGEST_LENGTH + asnlen + 4 > nframe)
pr_info("MPI: can't encode a %d bit MD into a %d bits frame\n",
@@ -48,7 +48,7 @@ MPI do_encode_md(const void *sha_buffer, unsigned nbits)
*/
frame = kmalloc(nframe, GFP_KERNEL);
if (!frame)
- return MPI_NULL;
+ return NULL;
n = 0;
frame[n++] = 0;
frame[n++] = 1; /* block type */
@@ -92,7 +92,7 @@ MPI mpi_read_from_buffer(const void *xbuffer, unsigned *ret_nread)
int i, j;
unsigned nbits, nbytes, nlimbs, nread = 0;
mpi_limb_t a;
- MPI val = MPI_NULL;
+ MPI val = NULL;
if (*ret_nread < 2)
goto leave;
@@ -109,7 +109,7 @@ MPI mpi_read_from_buffer(const void *xbuffer, unsigned *ret_nread)
nlimbs = (nbytes + BYTES_PER_MPI_LIMB - 1) / BYTES_PER_MPI_LIMB;
val = mpi_alloc(nlimbs);
if (!val)
- return MPI_NULL;
+ return NULL;
i = BYTES_PER_MPI_LIMB - nbytes % BYTES_PER_MPI_LIMB;
i %= BYTES_PER_MPI_LIMB;
val->nbits = nbits;
diff --git a/lib/mpi/mpiutil.c b/lib/mpi/mpiutil.c
index eefc55d6b7f..6bfc41f62b8 100644
--- a/lib/mpi/mpiutil.c
+++ b/lib/mpi/mpiutil.c
@@ -135,7 +135,7 @@ int mpi_copy(MPI *copied, const MPI a)
size_t i;
MPI b;
- *copied = MPI_NULL;
+ *copied = NULL;
if (a) {
b = mpi_alloc(a->nlimbs);