Changeset 1569a9b in mainline for uspace/app/fontviewer/fontviewer.c


Ignore:
Timestamp:
2017-12-24T16:40:33Z (6 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
48fd597
Parents:
a1026da
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-24 16:40:33)
git-committer:
GitHub <noreply@…> (2017-12-24 16:40:33)
Message:

The "not-so-obvious" error handling tweaks. (#9)

Some more changes to enable type-checking with errno_t. Some of the "fixes" here don't quite feel right, but a proper solution would be a more elaborate refactoring of the surrounding code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/fontviewer/fontviewer.c

    ra1026da r1569a9b  
    149149        va_end(args);
    150150       
    151         if (ret <= 0)
    152                 return ret;
    153        
    154         drawctx_set_source(drawctx, source);
    155         drawctx_set_font(drawctx, font);
    156         drawctx_print(drawctx, str, x, y);
    157        
    158         free(str);
     151        if (ret >= 0) {
     152                drawctx_set_source(drawctx, source);
     153                drawctx_set_font(drawctx, font);
     154                drawctx_print(drawctx, str, x, y);
     155
     156                free(str);
     157        }
    159158       
    160159        return ret;
Note: See TracChangeset for help on using the changeset viewer.