Changeset 76d0981d in mainline for uspace/app/wavplay


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.