Changeset 46577995 in mainline for uspace/lib/gui/window.c


Ignore:
Timestamp:
2018-01-04T20:50:52Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
e211ea04
Parents:
facacc71
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:47:53)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:50:52)
Message:

Use errno_t in all uspace and kernel code.

Change type of every variable, parameter and return value that holds an
<errno.h> constant to either errno_t (the usual case), or sys_errno_t
(some places in kernel). This is for the purpose of self-documentation,
as well as for type-checking with a bit of type definition hackery.

After this commit, HelenOS is free of code that mixes error codes with non-error
values on the assumption that error codes are negative.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/gui/window.c

    rfacacc71 r46577995  
    163163       
    164164        font_t *font;
    165         int rc = embedded_font_create(&font, 16);
     165        errno_t rc = embedded_font_create(&font, 16);
    166166        if (rc != EOK) {
    167167                window_yield(widget->window);
     
    404404       
    405405        /* Inform compositor about new surface. */
    406         int rc = win_resize(win->osess, offset_x, offset_y, width, height,
     406        errno_t rc = win_resize(win->osess, offset_x, offset_y, width, height,
    407407            placement_flags, surface_direct_access(new_surface));
    408408       
     
    493493
    494494/* Window event loop. Runs in own dedicated fibril. */
    495 static int event_loop(void *arg)
     495static errno_t event_loop(void *arg)
    496496{
    497497        bool is_main = false;
     
    561561
    562562/* Input fetcher from compositor. Runs in own dedicated fibril. */
    563 static int fetch_input(void *arg)
    564 {
    565         int rc;
     563static errno_t fetch_input(void *arg)
     564{
     565        errno_t rc;
    566566        bool terminate = false;
    567567        window_t *win = (window_t *) arg;
     
    618618       
    619619        service_id_t reg_dsid;
    620         int rc = loc_service_get_id(winreg, &reg_dsid, 0);
     620        errno_t rc = loc_service_get_id(winreg, &reg_dsid, 0);
    621621        if (rc != EOK) {
    622622                free(win);
     
    677677}
    678678
    679 int window_set_caption(window_t *win, const char *caption)
     679errno_t window_set_caption(window_t *win, const char *caption)
    680680{
    681681        char *cap;
Note: See TracChangeset for help on using the changeset viewer.