diff options
author | Mike Frysinger <vapier@chromium.org> | 2020-06-23 18:55:43 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@chromium.org> | 2020-07-15 06:20:02 +0000 |
commit | 09b056975dacd1f0f815ad820b6dc9913b0118a3 (patch) | |
tree | 67ba67549b44e6d98b9ff2dfb3e0396e0a252b96 /src/common/md5.cc | |
parent | Add support for dwarf5 line tables. (diff) | |
download | breakpad-09b056975dacd1f0f815ad820b6dc9913b0118a3.tar.xz |
fix pointer style to match the style guide
We do this in a lot of places, but we're inconsistent.
Normalize the code to the Google C++ style guide.
Change-Id: Ic2aceab661ce8f6b993dda21b1cdf5d2198dcbbf
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2262932
Reviewed-by: Sterling Augustine <saugustine@google.com>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Diffstat (limited to 'src/common/md5.cc')
-rw-r--r-- | src/common/md5.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/common/md5.cc b/src/common/md5.cc index 4f1ac8ca..b6e710da 100644 --- a/src/common/md5.cc +++ b/src/common/md5.cc @@ -31,7 +31,7 @@ static void byteReverse(unsigned char *buf, unsigned longs) do { t = (u32) ((unsigned) buf[3] << 8 | buf[2]) << 16 | ((unsigned) buf[1] << 8 | buf[0]); - *(u32 *) buf = t; + *(u32*) buf = t; buf += 4; } while (--longs); } @@ -74,7 +74,7 @@ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, size_t len) /* Handle any leading odd-sized chunks */ if (t) { - unsigned char *p = (unsigned char *) ctx->in + t; + unsigned char *p = (unsigned char*) ctx->in + t; t = 64 - t; if (len < t) { @@ -83,7 +83,7 @@ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, size_t len) } memcpy(p, buf, t); byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (u32 *) ctx->in); + MD5Transform(ctx->buf, (u32*) ctx->in); buf += t; len -= t; } @@ -92,7 +92,7 @@ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, size_t len) while (len >= 64) { memcpy(ctx->in, buf, 64); byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (u32 *) ctx->in); + MD5Transform(ctx->buf, (u32*) ctx->in); buf += 64; len -= 64; } @@ -127,7 +127,7 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx) /* Two lots of padding: Pad the first block to 64 bytes */ memset(p, 0, count); byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (u32 *) ctx->in); + MD5Transform(ctx->buf, (u32*) ctx->in); /* Now fill the next block with 56 bytes */ memset(ctx->in, 0, 56); @@ -141,8 +141,8 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx) memcpy(&ctx->in[14], &ctx->bits[0], sizeof(u32)); memcpy(&ctx->in[15], &ctx->bits[1], sizeof(u32)); - MD5Transform(ctx->buf, (u32 *) ctx->in); - byteReverse((unsigned char *) ctx->buf, 4); + MD5Transform(ctx->buf, (u32*) ctx->in); + byteReverse((unsigned char*) ctx->buf, 4); memcpy(digest, ctx->buf, 16); memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ } |