Skip to content

Commit 34083fb

Browse files
committed
Resync
1 parent 80d7a25 commit 34083fb

5 files changed

Lines changed: 50 additions & 41 deletions

File tree

audio/dsp_filters/reverb.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,17 +225,19 @@ struct reverb_data
225225

226226
static void reverb_free(void *data)
227227
{
228-
struct reverb_data *rev = (struct reverb_data*)data;
229228
unsigned i;
229+
struct reverb_data *rev = (struct reverb_data*)data;
230230

231-
for (i = 0; i < numcombs; i++) {
232-
free(rev->left.bufcomb[i]);
233-
free(rev->right.bufcomb[i]);
231+
for (i = 0; i < numcombs; i++)
232+
{
233+
free(rev->left.bufcomb[i]);
234+
free(rev->right.bufcomb[i]);
234235
}
235236

236-
for (i = 0; i < numallpasses; i++) {
237-
free(rev->left.bufallpass[i]);
238-
free(rev->right.bufallpass[i]);
237+
for (i = 0; i < numallpasses; i++)
238+
{
239+
free(rev->left.bufallpass[i]);
240+
free(rev->right.bufallpass[i]);
239241
}
240242
free(data);
241243
}

file/archive_file_zlib.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ static bool zlib_stream_decompress_data_to_file_init(
156156
zip_context->zstream->zfree = NULL;
157157
zip_context->zstream->opaque = NULL;
158158

159-
if (inflateInit2(zip_context->zstream, -MAX_WBITS) != Z_OK) {
159+
if (inflateInit2(zip_context->zstream, -MAX_WBITS) != Z_OK)
160+
{
160161
free(zip_context->zstream);
161162
zip_context->zstream = NULL;
162163
goto error;

file/file_path.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -569,20 +569,15 @@ size_t fill_str_dated_filename(char *s,
569569
const char *in_str, const char *ext, size_t len)
570570
{
571571
struct tm tm_;
572-
char format[NAME_MAX_LENGTH];
573572
size_t _len = 0;
574573
time_t cur_time = time(NULL);
575574
rtime_localtime(&cur_time, &tm_);
576575
_len = strlcpy(s, in_str, len);
577576
if (string_is_empty(ext))
578-
{
579-
strftime(format, sizeof(format), "-%y%m%d-%H%M%S", &tm_);
580-
_len += strlcpy(s + _len, format, len - _len);
581-
}
577+
_len += strftime(s + _len, len - _len, "-%y%m%d-%H%M%S", &tm_);
582578
else
583579
{
584-
strftime(format, sizeof(format), "-%y%m%d-%H%M%S.", &tm_);
585-
_len += strlcpy(s + _len, format, len - _len);
580+
_len += strftime(s + _len, len - _len, "-%y%m%d-%H%M%S.", &tm_);
586581
_len += strlcpy(s + _len, ext, len - _len);
587582
}
588583
return _len;

formats/libchdr/libchdr_huffman.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,8 @@ int huffman_build_tree(struct huffman_decoder* decoder, uint32_t totaldata, uint
427427

428428
#if 0
429429
fprintf(stderr, "Post-sort:\n");
430-
for (int i = 0; i < listitems; i++) {
430+
for (int i = 0; i < listitems; i++)
431431
fprintf(stderr, "weight: %d code: %d\n", list[i]->m_weight, list[i]->m_bits);
432-
}
433432
fprintf(stderr, "===================\n");
434433
#endif
435434

include/retro_endianness.h

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,9 @@ typedef struct retro_unaligned_uint64_s retro_unaligned_uint64_t;
416416
* @return The first two bytes of \c addr as a 16-bit unsigned integer,
417417
* byteswapped from big-endian to host-native order if necessary.
418418
*/
419-
static INLINE uint16_t retro_get_unaligned_16be(void *addr) {
420-
return retro_be_to_cpu16(retro_unaligned16(addr));
419+
static INLINE uint16_t retro_get_unaligned_16be(void *addr)
420+
{
421+
return retro_be_to_cpu16(retro_unaligned16(addr));
421422
}
422423

423424
/**
@@ -431,8 +432,9 @@ static INLINE uint16_t retro_get_unaligned_16be(void *addr) {
431432
* @return The first four bytes of \c addr as a 32-bit unsigned integer,
432433
* byteswapped from big-endian to host-native order if necessary.
433434
*/
434-
static INLINE uint32_t retro_get_unaligned_32be(void *addr) {
435-
return retro_be_to_cpu32(retro_unaligned32(addr));
435+
static INLINE uint32_t retro_get_unaligned_32be(void *addr)
436+
{
437+
return retro_be_to_cpu32(retro_unaligned32(addr));
436438
}
437439

438440
/**
@@ -446,8 +448,9 @@ static INLINE uint32_t retro_get_unaligned_32be(void *addr) {
446448
* @return The first eight bytes of \c addr as a 64-bit unsigned integer,
447449
* byteswapped from big-endian to host-native order if necessary.
448450
*/
449-
static INLINE uint64_t retro_get_unaligned_64be(void *addr) {
450-
return retro_be_to_cpu64(retro_unaligned64(addr));
451+
static INLINE uint64_t retro_get_unaligned_64be(void *addr)
452+
{
453+
return retro_be_to_cpu64(retro_unaligned64(addr));
451454
}
452455

453456
/**
@@ -461,8 +464,9 @@ static INLINE uint64_t retro_get_unaligned_64be(void *addr) {
461464
* @return The first two bytes of \c addr as a 16-bit unsigned integer,
462465
* byteswapped from little-endian to host-native order if necessary.
463466
*/
464-
static INLINE uint16_t retro_get_unaligned_16le(void *addr) {
465-
return retro_le_to_cpu16(retro_unaligned16(addr));
467+
static INLINE uint16_t retro_get_unaligned_16le(void *addr)
468+
{
469+
return retro_le_to_cpu16(retro_unaligned16(addr));
466470
}
467471

468472
/**
@@ -476,8 +480,9 @@ static INLINE uint16_t retro_get_unaligned_16le(void *addr) {
476480
* @return The first four bytes of \c addr as a 32-bit unsigned integer,
477481
* byteswapped from little-endian to host-native order if necessary.
478482
*/
479-
static INLINE uint32_t retro_get_unaligned_32le(void *addr) {
480-
return retro_le_to_cpu32(retro_unaligned32(addr));
483+
static INLINE uint32_t retro_get_unaligned_32le(void *addr)
484+
{
485+
return retro_le_to_cpu32(retro_unaligned32(addr));
481486
}
482487

483488
/**
@@ -491,8 +496,9 @@ static INLINE uint32_t retro_get_unaligned_32le(void *addr) {
491496
* @return The first eight bytes of \c addr as a 64-bit unsigned integer,
492497
* byteswapped from little-endian to host-native order if necessary.
493498
*/
494-
static INLINE uint64_t retro_get_unaligned_64le(void *addr) {
495-
return retro_le_to_cpu64(retro_unaligned64(addr));
499+
static INLINE uint64_t retro_get_unaligned_64le(void *addr)
500+
{
501+
return retro_le_to_cpu64(retro_unaligned64(addr));
496502
}
497503

498504
/**
@@ -505,8 +511,9 @@ static INLINE uint64_t retro_get_unaligned_64le(void *addr) {
505511
* the way a \c uint16_t* usually would be.
506512
* @param v The value to write.
507513
*/
508-
static INLINE void retro_set_unaligned_16le(void *addr, uint16_t v) {
509-
retro_unaligned16(addr) = retro_cpu_to_le16(v);
514+
static INLINE void retro_set_unaligned_16le(void *addr, uint16_t v)
515+
{
516+
retro_unaligned16(addr) = retro_cpu_to_le16(v);
510517
}
511518

512519
/**
@@ -519,8 +526,9 @@ static INLINE void retro_set_unaligned_16le(void *addr, uint16_t v) {
519526
* the way a \c uint32_t* usually would be.
520527
* @param v The value to write.
521528
*/
522-
static INLINE void retro_set_unaligned_32le(void *addr, uint32_t v) {
523-
retro_unaligned32(addr) = retro_cpu_to_le32(v);
529+
static INLINE void retro_set_unaligned_32le(void *addr, uint32_t v)
530+
{
531+
retro_unaligned32(addr) = retro_cpu_to_le32(v);
524532
}
525533

526534
/**
@@ -533,8 +541,9 @@ static INLINE void retro_set_unaligned_32le(void *addr, uint32_t v) {
533541
* the way a \c uint64_t* usually would be.
534542
* @param v The value to write.
535543
*/
536-
static INLINE void retro_set_unaligned_64le(void *addr, uint64_t v) {
537-
retro_unaligned64(addr) = retro_cpu_to_le64(v);
544+
static INLINE void retro_set_unaligned_64le(void *addr, uint64_t v)
545+
{
546+
retro_unaligned64(addr) = retro_cpu_to_le64(v);
538547
}
539548

540549
/**
@@ -547,8 +556,9 @@ static INLINE void retro_set_unaligned_64le(void *addr, uint64_t v) {
547556
* the way a \c uint16_t* usually would be.
548557
* @param v The value to write.
549558
*/
550-
static INLINE void retro_set_unaligned_16be(void *addr, uint16_t v) {
551-
retro_unaligned16(addr) = retro_cpu_to_be16(v);
559+
static INLINE void retro_set_unaligned_16be(void *addr, uint16_t v)
560+
{
561+
retro_unaligned16(addr) = retro_cpu_to_be16(v);
552562
}
553563

554564
/**
@@ -561,8 +571,9 @@ static INLINE void retro_set_unaligned_16be(void *addr, uint16_t v) {
561571
* the way a \c uint32_t* usually would be.
562572
* @param v The value to write.
563573
*/
564-
static INLINE void retro_set_unaligned_32be(void *addr, uint32_t v) {
565-
retro_unaligned32(addr) = retro_cpu_to_be32(v);
574+
static INLINE void retro_set_unaligned_32be(void *addr, uint32_t v)
575+
{
576+
retro_unaligned32(addr) = retro_cpu_to_be32(v);
566577
}
567578

568579
/**
@@ -575,8 +586,9 @@ static INLINE void retro_set_unaligned_32be(void *addr, uint32_t v) {
575586
* the way a \c uint64_t* usually would be.
576587
* @param v The value to write.
577588
*/
578-
static INLINE void retro_set_unaligned_64be(void *addr, uint64_t v) {
579-
retro_unaligned64(addr) = retro_cpu_to_be64(v);
589+
static INLINE void retro_set_unaligned_64be(void *addr, uint64_t v)
590+
{
591+
retro_unaligned64(addr) = retro_cpu_to_be64(v);
580592
}
581593

582594

0 commit comments

Comments
 (0)