This commit is contained in:
twinaphex 2016-05-07 18:35:06 +02:00
parent 7f272a4bd0
commit ef5da43d35
2 changed files with 7 additions and 7 deletions

View File

@ -184,6 +184,7 @@ static void rjpeg_decode_dht(struct rjpeg_data *ctx)
counts[codelen - 1] = ctx->pos[codelen]; counts[codelen - 1] = ctx->pos[codelen];
rjpeg_skip(ctx, 17); rjpeg_skip(ctx, 17);
vlc = &ctx->vlctab[i][0]; vlc = &ctx->vlctab[i][0];
for (codelen = 1; codelen <= 16; ++codelen) for (codelen = 1; codelen <= 16; ++codelen)
{ {
int currcnt; int currcnt;
@ -241,10 +242,11 @@ static int rjpeg_show_bits(struct rjpeg_data *ctx, int bits)
continue; continue;
} }
newbyte = *ctx->pos++; newbyte = *ctx->pos++;
ctx->size--; ctx->size--;
ctx->bufbits += 8; ctx->bufbits += 8;
ctx->buf = (ctx->buf << 8) | newbyte; ctx->buf = (ctx->buf << 8) | newbyte;
if (newbyte == 0xFF) if (newbyte == 0xFF)
{ {
if (ctx->size) if (ctx->size)
@ -263,7 +265,7 @@ static int rjpeg_show_bits(struct rjpeg_data *ctx, int bits)
ctx->error = RJPEG_SYNTAX_ERROR; ctx->error = RJPEG_SYNTAX_ERROR;
else else
{ {
ctx->buf = (ctx->buf << 8) | marker; ctx->buf = (ctx->buf << 8) | marker;
ctx->bufbits += 8; ctx->bufbits += 8;
} }
} }

View File

@ -73,12 +73,10 @@ void logger_init (void)
void logger_shutdown (void) void logger_shutdown (void)
{ {
int ret = socket_close(g_sid); if (socket_close(g_sid) < 0)
printf("Could not close socket.\n");
network_deinit(); network_deinit();
if (ret < 0)
printf("Could not deinitialize network logger interface.\n");
} }
void logger_send(const char *__format,...) void logger_send(const char *__format,...)