mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 05:43:34 +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)
|
static void rtga__skip(rtga__context *s, int n)
|
||||||
{
|
{
|
||||||
if (n < 0) {
|
if (n < 0)
|
||||||
|
{
|
||||||
s->img_buffer = s->img_buffer_end;
|
s->img_buffer = s->img_buffer_end;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,8 @@ char *string_trim_whitespace(char *const s)
|
|||||||
return 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;
|
unsigned i = 0;
|
||||||
int k, counter;
|
int k, counter;
|
||||||
|
|
||||||
@ -214,4 +215,4 @@ char* word_wrap(char* buffer, char* string, int line_width) {
|
|||||||
buffer[i] = 0;
|
buffer[i] = 0;
|
||||||
|
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
@ -217,24 +217,27 @@ void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size)
|
|||||||
|
|
||||||
used = saved_lo & 0x3f;
|
used = saved_lo & 0x3f;
|
||||||
|
|
||||||
if (used) {
|
if (used)
|
||||||
available = 64 - used;
|
{
|
||||||
|
available = 64 - used;
|
||||||
|
|
||||||
if (size < available) {
|
if (size < available)
|
||||||
memcpy(&ctx->buffer[used], data, size);
|
{
|
||||||
return;
|
memcpy(&ctx->buffer[used], data, size);
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(&ctx->buffer[used], data, available);
|
memcpy(&ctx->buffer[used], data, available);
|
||||||
data = (const unsigned char *)data + available;
|
data = (const unsigned char *)data + available;
|
||||||
size -= available;
|
size -= available;
|
||||||
MD5_body(ctx, ctx->buffer, 64);
|
MD5_body(ctx, ctx->buffer, 64);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (size >= 64) {
|
if (size >= 64)
|
||||||
data = MD5_body(ctx, data, size & ~(unsigned long)0x3f);
|
{
|
||||||
size &= 0x3f;
|
data = MD5_body(ctx, data, size & ~(unsigned long)0x3f);
|
||||||
}
|
size &= 0x3f;
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(ctx->buffer, data, size);
|
memcpy(ctx->buffer, data, size);
|
||||||
}
|
}
|
||||||
@ -249,12 +252,13 @@ void MD5_Final(unsigned char *result, MD5_CTX *ctx)
|
|||||||
|
|
||||||
available = 64 - used;
|
available = 64 - used;
|
||||||
|
|
||||||
if (available < 8) {
|
if (available < 8)
|
||||||
memset(&ctx->buffer[used], 0, available);
|
{
|
||||||
MD5_body(ctx, ctx->buffer, 64);
|
memset(&ctx->buffer[used], 0, available);
|
||||||
used = 0;
|
MD5_body(ctx, ctx->buffer, 64);
|
||||||
available = 64;
|
used = 0;
|
||||||
}
|
available = 64;
|
||||||
|
}
|
||||||
|
|
||||||
memset(&ctx->buffer[used], 0, available - 8);
|
memset(&ctx->buffer[used], 0, available - 8);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user