From 507e82825f659742b76df9179e59975b3bd55b30 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sun, 25 Dec 2016 00:23:34 -0800 Subject: [PATCH] framebuffer: Fix font layout function return values The return type is nserror, so they should return NSERROR_OK, not true. --- frontends/framebuffer/font_freetype.c | 10 +++++----- frontends/framebuffer/font_internal.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/frontends/framebuffer/font_freetype.c b/frontends/framebuffer/font_freetype.c index 9235ad476..42be6d443 100644 --- a/frontends/framebuffer/font_freetype.c +++ b/frontends/framebuffer/font_freetype.c @@ -445,7 +445,7 @@ fb_font_width(const plot_font_style_t *fstyle, *width += glyph->advance.x >> 16; } - return true; + return NSERROR_OK; } @@ -481,7 +481,7 @@ fb_font_position(const plot_font_style_t *fstyle, *actual_x = prev_x; *char_offset = nxtchr; - return true; + return NSERROR_OK; } @@ -494,7 +494,7 @@ fb_font_position(const plot_font_style_t *fstyle, * \param x width available * \param char_offset updated to offset in string of actual_x, [1..length] * \param actual_x updated to x coordinate of character closest to x - * \return true on success, false on error and error reported + * \return NSERROR_OK on success or error code on failure * * On exit, char_offset indicates first character after split point. * @@ -537,7 +537,7 @@ fb_font_split(const plot_font_style_t *fstyle, * found a space; return previous space */ *actual_x = last_space_x; *char_offset = last_space_idx; - return true; + return NSERROR_OK; } nxtchr = utf8_next(string, length, nxtchr); @@ -545,7 +545,7 @@ fb_font_split(const plot_font_style_t *fstyle, *char_offset = nxtchr; - return true; + return NSERROR_OK; } static struct gui_layout_table layout_table = { diff --git a/frontends/framebuffer/font_internal.c b/frontends/framebuffer/font_internal.c index 9164a29db..a9054098f 100644 --- a/frontends/framebuffer/font_internal.c +++ b/frontends/framebuffer/font_internal.c @@ -364,7 +364,7 @@ fb_font_width(const plot_font_style_t *fstyle, } *width *= fb_get_font_size(fstyle); - return true; + return NSERROR_OK; } @@ -397,7 +397,7 @@ fb_font_position(const plot_font_style_t *fstyle, *actual_x = x_pos; *char_offset = nxtchr; - return true; + return NSERROR_OK; } @@ -410,7 +410,7 @@ fb_font_position(const plot_font_style_t *fstyle, * \param x width available * \param char_offset updated to offset in string of actual_x, [1..length] * \param actual_x updated to x coordinate of character closest to x - * \return true on success, false on error and error reported + * \return NSERROR_OK on success or error code on failure * * On exit, char_offset indicates first character after split point. * @@ -455,7 +455,7 @@ fb_font_split(const plot_font_style_t *fstyle, * found a space; return previous space */ *actual_x = last_space_x; *char_offset = last_space_idx; - return true; + return NSERROR_OK; } nxtchr = utf8_next(string, length, nxtchr); @@ -463,7 +463,7 @@ fb_font_split(const plot_font_style_t *fstyle, *char_offset = nxtchr; - return true; + return NSERROR_OK; } -- 2.11.0