From: Vladimir 'phcoder' Serbinenko Date: Sun, 26 Feb 2012 16:20:30 +0000 (+0100) Subject: * grub-core/normal/charset.c (grub_utf8_to_ucs4_alloc): Fix return type X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=8b282ad22220803b154a258783e02400731ed062;p=grub2.git * grub-core/normal/charset.c (grub_utf8_to_ucs4_alloc): Fix return type to grub_ssize_t. * grub-core/normal/main.c (grub_normal_init_page): Fix msg_len type. * include/grub/charset.h (grub_utf8_to_ucs4_alloc): Fix prototype. --- diff --git a/ChangeLog b/ChangeLog index 4da6d0ba0..611e198be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-02-25 Vladimir Serbinenko + + * grub-core/normal/charset.c (grub_utf8_to_ucs4_alloc): Fix return type + to grub_ssize_t. + * grub-core/normal/main.c (grub_normal_init_page): Fix msg_len type. + * include/grub/charset.h (grub_utf8_to_ucs4_alloc): Fix prototype. + 2012-02-25 Vladimir Serbinenko * grub-core/normal/menu_text.c (grub_print_message_indented_real): Add diff --git a/grub-core/normal/charset.c b/grub-core/normal/charset.c index dacd2126d..d5aa0f6a7 100644 --- a/grub-core/normal/charset.c +++ b/grub-core/normal/charset.c @@ -288,9 +288,9 @@ grub_is_valid_utf8 (const grub_uint8_t *src, grub_size_t srcsize) return 1; } -int +grub_ssize_t grub_utf8_to_ucs4_alloc (const char *msg, grub_uint32_t **unicode_msg, - grub_uint32_t **last_position) + grub_uint32_t **last_position) { grub_size_t msg_len = grub_strlen (msg); diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c index ceeaa794d..aea540457 100644 --- a/grub-core/normal/main.c +++ b/grub-core/normal/main.c @@ -209,7 +209,7 @@ read_config_file (const char *config) void grub_normal_init_page (struct grub_term_output *term) { - int msg_len; + grub_ssize_t msg_len; int posx; const char *msg = _("GNU GRUB version %s"); char *msg_formatted; diff --git a/include/grub/charset.h b/include/grub/charset.h index 3036d1693..41da01f1c 100644 --- a/include/grub/charset.h +++ b/include/grub/charset.h @@ -174,8 +174,9 @@ char *grub_ucs4_to_utf8_alloc (const grub_uint32_t *src, grub_size_t size); int grub_is_valid_utf8 (const grub_uint8_t *src, grub_size_t srcsize); -int grub_utf8_to_ucs4_alloc (const char *msg, grub_uint32_t **unicode_msg, - grub_uint32_t **last_position); +grub_ssize_t grub_utf8_to_ucs4_alloc (const char *msg, + grub_uint32_t **unicode_msg, + grub_uint32_t **last_position); /* Process one character from UTF8 sequence. At beginning set *code = 0, *count = 0. Returns 0 on failure and