diff --git a/.dir-locals.el b/.dir-locals.el index ad047f7..31a7ea7 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -1,10 +1,10 @@ ;;; This file is used by Emacs to configure it's code editing modes to correctly ;;; indent cbootimage style source code. -((nil . ((indent-tabs-mode . t) - (tab-width . 4) - (fill-column . 80))) - (c-mode . ((c-tab-always-indent . nil) - (c-basic-offset . 4))) - (c++-mode . ((c-tab-always-indent . nil) - (c-basic-offset . 4)))) +((nil . ((indent-tabs-mode . t) + (tab-width . 8) + (fill-column . 80))) + + (c-mode . ((c-basic-offset . 8))) + + (c++-mode . ((c-basic-offset . 8)))) diff --git a/bct_dump.c b/bct_dump.c index bc9bd81..15f937b 100644 --- a/bct_dump.c +++ b/bct_dump.c @@ -99,17 +99,17 @@ main(int argc, char *argv[]) } e = context.bctlib.get_value(nvbct_lib_id_bootloader_used, - &bootloaders_used, - context.bct); + &bootloaders_used, + context.bct); for (i = 0; (e == 0) && (i < bootloaders_used); ++i) { printf("Bootloader[%d]\n", i); for (j = 0; j < sizeof(bl_values) / sizeof(bl_values[0]); ++j) { e = context.bctlib.getbl_param(i, - bl_values[j].id, - &data, - context.bct); + bl_values[j].id, + &data, + context.bct); printf(bl_values[j].message, e == 0 ? data : -1); } } diff --git a/context.c b/context.c index 771b7fe..daf0101 100644 --- a/context.c +++ b/context.c @@ -32,9 +32,9 @@ query_alloc(build_image_context *context, u_int32_t size; /* Note: 3rd argument not used in this particular query. */ - if (context->bctlib.get_value(size_id, - &size, context->bct) != 0) + if (context->bctlib.get_value(size_id, &size, context->bct) != 0) return -ENODATA; + *dst = malloc(size); if (*dst == NULL)