Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287109
b: refs/heads/master
c: 3cccd15
h: refs/heads/master
i:
  287107: 5d7687e
v: v3
  • Loading branch information
Dmitry Kasatkin authored and James Morris committed Feb 1, 2012
1 parent e2f924a commit d36ab02
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c70c471c585a3fc1a10c792d5121b3803c83dde0
refs/heads/master: 3cccd1543ab623a5065335bf08350e06ffc788ab
2 changes: 0 additions & 2 deletions trunk/include/linux/mpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ struct gcry_mpi {

typedef struct gcry_mpi *MPI;

#define MPI_NULL NULL

#define mpi_get_nlimbs(a) ((a)->nlimbs)
#define mpi_is_neg(a) ((a)->sign)

Expand Down
8 changes: 4 additions & 4 deletions trunk/lib/mpi/mpicoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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 */
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion trunk/lib/mpi/mpiutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d36ab02

Please sign in to comment.