code-style: general cleanups (#137)

* tns_clean_cache: remove unused function arg

* remove malloc casting

* improve consistency

use sizeof(T) at the end

* avoid comparing integers of different signedness

* use Window type for embed and parent

* remove unnecessary comparisons

* remove cpp style comments

* improve consistency: remove comma from the end of enumerator list

* Removed useless _IMAGE_CONFIG defines

* consistency: use the same order as snprintf

* Resolve c89 warnings


Co-authored-by: uidops <uidops@protonmail.com>
Co-authored-by: Arthur Williams <taaparthur@gmail.com>
This commit is contained in:
N-R-K
2021-10-29 02:00:53 +06:00
committed by GitHub
parent 03eb664e89
commit 850bc788c3
9 changed files with 42 additions and 45 deletions

2
util.c
View File

@ -82,7 +82,7 @@ void error(int eval, int err, const char* fmt, ...)
void size_readable(float *size, const char **unit)
{
const char *units[] = { "", "K", "M", "G" };
int i;
unsigned int i;
for (i = 0; i < ARRLEN(units) && *size > 1024.0; i++)
*size /= 1024.0;