Changeset 76d0981d in mainline for uspace/app


Ignore:
Timestamp:
2018-04-12T12:57:20Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3bacee1
Parents:
9c514be
git-author:
Jiri Svoboda <jiri@…> (2018-04-11 18:18:43)
git-committer:
Jiri Svoboda <jiri@…> (2018-04-12 12:57:20)
Message:

Use proper boolean constant in while loops.

Location:
uspace/app
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/mkdir/mkdir.c

    r9c514be r76d0981d  
    2727 */
    2828
     29#include <stdbool.h>
    2930#include <stdio.h>
    3031#include <stdlib.h>
     
    106107                /* Create the parent directories as well. */
    107108                size_t off = 0;
    108                 while (1) {
     109                while (true) {
    109110                        size_t prev_off = off;
    110111                        wchar_t cur_char = str_decode(path, &off, STR_NO_LIMIT);
  • uspace/app/mkbd/main.c

    r9c514be r76d0981d  
    171171        printf("Press <ESC> to quit the application.\n");
    172172
    173         while (1) {
     173        while (true) {
    174174                cons_event_t ev;
    175175                bool ok = console_get_event(con, &ev);
  • uspace/app/tetris/scores.c

    r9c514be r76d0981d  
    5959
    6060#include <errno.h>
     61#include <stdbool.h>
    6162#include <stdio.h>
    6263#include <str.h>
     
    138139            "........................................");
    139140
    140         while (1) {
     141        while (true) {
    141142                console_flush(console);
    142143                if (!console_get_event(console, &ev))
  • uspace/app/tetris/tetris.c

    r9c514be r76d0981d  
    5757#include <sys/time.h>
    5858#include <errno.h>
     59#include <stdbool.h>
    5960#include <stdio.h>
    6061#include <stdlib.h>
     
    200201{
    201202        tetris_menu_draw(*level);
    202         while (1) {
     203        while (true) {
    203204                int i = getchar();
    204205
     
    327328                scr_msg(key_msg, 1);
    328329
    329                 while (1) {
     330                while (true) {
    330331                        place(curshape, pos, 1);
    331332                        scr_update();
  • uspace/app/wavplay/dplay.c

    r9c514be r76d0981d  
    4444#include <sys/time.h>
    4545#include <inttypes.h>
    46 
     46#include <stdbool.h>
    4747#include <stdio.h>
    4848#include <macros.h>
     
    101101        playback_t *pb = arg;
    102102        const size_t fragment_size = pb->buffer.size / DEFAULT_FRAGMENTS;
    103         while (1) {
     103        while (true) {
    104104                ipc_call_t call;
    105105                cap_call_handle_t chandle = async_get_call(&call);
     
    260260        struct timeval time = { 0 };
    261261        getuptime(&time);
    262         do {
     262        while (true) {
    263263                size_t available = buffer_avail(pb, pos);
    264264                /* Writing might need wrap around the end,
     
    324324                        break;
    325325
    326         } while (1);
     326        }
    327327        audio_pcm_stop_playback_immediate(pb->device);
    328328}
Note: See TracChangeset for help on using the changeset viewer.