diff options
Diffstat (limited to 'payloads/libpayload/libc')
-rw-r--r-- | payloads/libpayload/libc/args.c | 4 | ||||
-rw-r--r-- | payloads/libpayload/libc/malloc.c | 6 | ||||
-rw-r--r-- | payloads/libpayload/libc/memory.c | 2 | ||||
-rw-r--r-- | payloads/libpayload/libc/printf.c | 18 |
4 files changed, 15 insertions, 15 deletions
diff --git a/payloads/libpayload/libc/args.c b/payloads/libpayload/libc/args.c index 8242d60bba..663d767dc5 100644 --- a/payloads/libpayload/libc/args.c +++ b/payloads/libpayload/libc/args.c @@ -35,8 +35,8 @@ #include <libpayload.h> #include <getopt.h> -/* We don't want to waste malloc on this, so we live with a small - * fixed size array +/* We don't want to waste malloc on this, so we live with a small + * fixed size array */ char *string_argv[MAX_ARGS]; int string_argc; diff --git a/payloads/libpayload/libc/malloc.c b/payloads/libpayload/libc/malloc.c index 9e1dd2e575..6389fc9379 100644 --- a/payloads/libpayload/libc/malloc.c +++ b/payloads/libpayload/libc/malloc.c @@ -286,10 +286,10 @@ static struct align_region_t *allocate_region(int alignment, int num_elements) { struct align_region_t *new_region; #ifdef CONFIG_DEBUG_MALLOC - printf("%s(old align_regions=%p, alignment=%u, num_elements=%u)\n", + printf("%s(old align_regions=%p, alignment=%u, num_elements=%u)\n", __func__, align_regions, alignment, num_elements); #endif - + new_region = malloc(sizeof(struct align_region_t)); if (!new_region) @@ -342,7 +342,7 @@ void *memalign(size_t align, size_t size) memset(align_regions, 0, sizeof(struct align_region_t)); } struct align_region_t *reg = align_regions; -look_further: +look_further: while (reg != 0) { if ((reg->alignment == align) && (reg->free >= (size + align - 1)/align)) diff --git a/payloads/libpayload/libc/memory.c b/payloads/libpayload/libc/memory.c index afc38cb263..4757b10596 100644 --- a/payloads/libpayload/libc/memory.c +++ b/payloads/libpayload/libc/memory.c @@ -72,7 +72,7 @@ void *memmove(void *dst, const void *src, size_t n) offs = n - (n % sizeof(unsigned long)); for (i = (n % sizeof(unsigned long)) - 1; i >= 0; i--) - ((unsigned char *)dst)[i + offs] = + ((unsigned char *)dst)[i + offs] = ((unsigned char *)src)[i + offs]; for (i = n / sizeof(unsigned long) - 1; i >= 0; i--) diff --git a/payloads/libpayload/libc/printf.c b/payloads/libpayload/libc/printf.c index 3973e90f22..d53e99a8fe 100644 --- a/payloads/libpayload/libc/printf.c +++ b/payloads/libpayload/libc/printf.c @@ -368,7 +368,7 @@ static int print_number(uint64_t num, int width, int precision, int base, * * Print string formatted according to the fmt parameter and variadic arguments. * Each formatting directive must have the following form: - * + * * \% [ FLAGS ] [ WIDTH ] [ .PRECISION ] [ TYPE ] CONVERSION * * FLAGS:@n @@ -386,7 +386,7 @@ static int print_number(uint64_t num, int width, int precision, int base, * - "0" Print 0 as padding instead of spaces. Zeroes are placed between * sign and the rest of the number. This flag is ignored if "-" * flag is specified. - * + * * WIDTH:@n * - Specify the minimal width of a printed argument. If it is bigger, * width is ignored. If width is specified with a "*" character instead of @@ -403,15 +403,15 @@ static int print_number(uint64_t num, int width, int precision, int base, * value is then expected in parameters. When both width and precision are * specified using "*", the first parameter is used for width and the * second one for precision. - * + * * TYPE:@n * - "hh" Signed or unsigned char.@n * - "h" Signed or unsigned short.@n * - "" Signed or unsigned int (default value).@n * - "l" Signed or unsigned long int.@n * - "ll" Signed or unsigned long long int.@n - * - * + * + * * CONVERSION:@n * - % Print percentile character itself. * @@ -419,16 +419,16 @@ static int print_number(uint64_t num, int width, int precision, int base, * * - s Print zero terminated string. If a NULL value is passed as * value, "(NULL)" is printed instead. - * + * * - P, p Print value of a pointer. Void * value is expected and it is * printed in hexadecimal notation with prefix (as with \%#X / \%#x * for 32-bit or \%#X / \%#x for 64-bit long pointers). * * - b Print value as unsigned binary number. Prefix is not printed by * default. (Nonstandard extension.) - * + * * - o Print value as unsigned octal number. Prefix is not printed by - * default. + * default. * * - d, i Print signed decimal number. There is no difference between d * and i conversion. @@ -437,7 +437,7 @@ static int print_number(uint64_t num, int width, int precision, int base, * * - X, x Print hexadecimal number with upper- or lower-case. Prefix is * not printed by default. - * + * * All other characters from fmt except the formatting directives are printed in * verbatim. * |