mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-22 18:58:21 +00:00
(libretro-common) Style nits
This commit is contained in:
parent
9a87bada55
commit
c6e1b47d98
@ -66,7 +66,8 @@ static INLINE uint8_t rtga__get8(rtga__context *s)
|
||||
|
||||
static void rtga__skip(rtga__context *s, int n)
|
||||
{
|
||||
if (n < 0) {
|
||||
if (n < 0)
|
||||
{
|
||||
s->img_buffer = s->img_buffer_end;
|
||||
return;
|
||||
}
|
||||
|
@ -165,7 +165,8 @@ char *string_trim_whitespace(char *const s)
|
||||
return s;
|
||||
}
|
||||
|
||||
char* word_wrap(char* buffer, char* string, int line_width) {
|
||||
char* word_wrap(char* buffer, char* string, int line_width)
|
||||
{
|
||||
unsigned i = 0;
|
||||
int k, counter;
|
||||
|
||||
@ -214,4 +215,4 @@ char* word_wrap(char* buffer, char* string, int line_width) {
|
||||
buffer[i] = 0;
|
||||
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
|
@ -217,24 +217,27 @@ void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size)
|
||||
|
||||
used = saved_lo & 0x3f;
|
||||
|
||||
if (used) {
|
||||
available = 64 - used;
|
||||
if (used)
|
||||
{
|
||||
available = 64 - used;
|
||||
|
||||
if (size < available) {
|
||||
memcpy(&ctx->buffer[used], data, size);
|
||||
return;
|
||||
}
|
||||
if (size < available)
|
||||
{
|
||||
memcpy(&ctx->buffer[used], data, size);
|
||||
return;
|
||||
}
|
||||
|
||||
memcpy(&ctx->buffer[used], data, available);
|
||||
data = (const unsigned char *)data + available;
|
||||
size -= available;
|
||||
MD5_body(ctx, ctx->buffer, 64);
|
||||
}
|
||||
memcpy(&ctx->buffer[used], data, available);
|
||||
data = (const unsigned char *)data + available;
|
||||
size -= available;
|
||||
MD5_body(ctx, ctx->buffer, 64);
|
||||
}
|
||||
|
||||
if (size >= 64) {
|
||||
data = MD5_body(ctx, data, size & ~(unsigned long)0x3f);
|
||||
size &= 0x3f;
|
||||
}
|
||||
if (size >= 64)
|
||||
{
|
||||
data = MD5_body(ctx, data, size & ~(unsigned long)0x3f);
|
||||
size &= 0x3f;
|
||||
}
|
||||
|
||||
memcpy(ctx->buffer, data, size);
|
||||
}
|
||||
@ -249,12 +252,13 @@ void MD5_Final(unsigned char *result, MD5_CTX *ctx)
|
||||
|
||||
available = 64 - used;
|
||||
|
||||
if (available < 8) {
|
||||
memset(&ctx->buffer[used], 0, available);
|
||||
MD5_body(ctx, ctx->buffer, 64);
|
||||
used = 0;
|
||||
available = 64;
|
||||
}
|
||||
if (available < 8)
|
||||
{
|
||||
memset(&ctx->buffer[used], 0, available);
|
||||
MD5_body(ctx, ctx->buffer, 64);
|
||||
used = 0;
|
||||
available = 64;
|
||||
}
|
||||
|
||||
memset(&ctx->buffer[used], 0, available - 8);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user