Changeset 46577995 in mainline for uspace/app/tetris


Ignore:
Timestamp:
2018-01-04T20:50:52Z (8 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.

Location:
uspace/app/tetris
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tetris/scores.c

    rfacacc71 r46577995  
    205205}
    206206
    207 int loadscores(void)
     207errno_t loadscores(void)
    208208{
    209209        FILE *f;
  • uspace/app/tetris/scores.h

    rfacacc71 r46577995  
    7272extern void initscores(void);
    7373extern void insertscore(int score, int level);
    74 extern int loadscores(void);
     74extern errno_t loadscores(void);
    7575extern void savescores(void);
    7676
  • uspace/app/tetris/screen.c

    rfacacc71 r46577995  
    138138winsize_t winsize;
    139139
    140 static int get_display_size(winsize_t *ws)
     140static errno_t get_display_size(winsize_t *ws)
    141141{
    142142        return console_get_size(console, &ws->ws_col, &ws->ws_row);
     
    146146{
    147147        sysarg_t ccap;
    148         int rc = console_get_color_cap(console, &ccap);
     148        errno_t rc = console_get_color_cap(console, &ccap);
    149149       
    150150        if (rc != 0)
Note: See TracChangeset for help on using the changeset viewer.