Skip to content
This repository was archived by the owner on Oct 31, 2022. It is now read-only.

Commit b96fd2b

Browse files
committed
Replace tabs with spaces, oops
1 parent fbbd54b commit b96fd2b

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

external/hap/hap.c

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -340,40 +340,40 @@ unsigned int HapEncode(const void *inputBuffer, unsigned long inputBufferBytes,
340340

341341
static void hap_decode_chunk(HapChunkDecodeInfo chunks[], unsigned int index)
342342
{
343-
if (chunks)
344-
{
345-
if (chunks[index].compressor == kHapCompressorSnappy)
346-
{
347-
snappy_status snappy_result = snappy_uncompress(chunks[index].compressed_chunk_data,
348-
chunks[index].compressed_chunk_size,
349-
chunks[index].uncompressed_chunk_data,
350-
&chunks[index].uncompressed_chunk_size);
351-
352-
switch (snappy_result)
353-
{
354-
case SNAPPY_INVALID_INPUT:
355-
chunks[index].result = HapResult_Bad_Frame;
356-
break;
357-
case SNAPPY_OK:
358-
chunks[index].result = HapResult_No_Error;
359-
break;
360-
default:
361-
chunks[index].result = HapResult_Internal_Error;
362-
break;
363-
}
364-
}
365-
else if (chunks[index].compressor == kHapCompressorNone)
366-
{
367-
memcpy(chunks[index].uncompressed_chunk_data,
368-
chunks[index].compressed_chunk_data,
369-
chunks[index].compressed_chunk_size);
370-
chunks[index].result = HapResult_No_Error;
371-
}
372-
else
373-
{
374-
chunks[index].result = HapResult_Bad_Frame;
375-
}
376-
}
343+
if (chunks)
344+
{
345+
if (chunks[index].compressor == kHapCompressorSnappy)
346+
{
347+
snappy_status snappy_result = snappy_uncompress(chunks[index].compressed_chunk_data,
348+
chunks[index].compressed_chunk_size,
349+
chunks[index].uncompressed_chunk_data,
350+
&chunks[index].uncompressed_chunk_size);
351+
352+
switch (snappy_result)
353+
{
354+
case SNAPPY_INVALID_INPUT:
355+
chunks[index].result = HapResult_Bad_Frame;
356+
break;
357+
case SNAPPY_OK:
358+
chunks[index].result = HapResult_No_Error;
359+
break;
360+
default:
361+
chunks[index].result = HapResult_Internal_Error;
362+
break;
363+
}
364+
}
365+
else if (chunks[index].compressor == kHapCompressorNone)
366+
{
367+
memcpy(chunks[index].uncompressed_chunk_data,
368+
chunks[index].compressed_chunk_data,
369+
chunks[index].compressed_chunk_size);
370+
chunks[index].result = HapResult_No_Error;
371+
}
372+
else
373+
{
374+
chunks[index].result = HapResult_Bad_Frame;
375+
}
376+
}
377377
}
378378

379379
unsigned int HapDecode(const void *inputBuffer, unsigned long inputBufferBytes,

0 commit comments

Comments
 (0)