Changeset 902dd4b in mainline


Ignore:
Timestamp:
2018-04-15T19:21:10Z (7 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
30e9f42, cbc534c
Parents:
2ee0e4a1
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-04-15 19:20:12)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-04-15 19:21:10)
Message:

Remove const qualifier from arguments that pass ownership of a buffer.

Location:
uspace
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/hound/include/hound/protocol.h

    r2ee0e4a1 r902dd4b  
    119119        errno_t (*drain_stream)(void *);
    120120        /** Write new data to the stream */
    121         errno_t (*stream_data_write)(void *, const void *, size_t);
     121        errno_t (*stream_data_write)(void *, void *, size_t);
    122122        /** Read data from the stream */
    123123        errno_t (*stream_data_read)(void *, void *, size_t);
  • uspace/srv/audio/hound/audio_data.c

    r2ee0e4a1 r902dd4b  
    4242/**
    4343 * Create reference counted buffer out of ordinary data buffer.
    44  * @param data audio buffer
     44 * @param data audio buffer. The memory passed will be freed eventually.
    4545 * @param size Size of the @p data buffer.
    46  * @param fomart audio data format.
     46 * @param format audio data format.
    4747 * @return pointer to valid audio data structure, NULL on failure.
    4848 */
    49 audio_data_t *audio_data_create(const void *data, size_t size,
     49audio_data_t *audio_data_create(void *data, size_t size,
    5050    pcm_format_t format)
    5151{
     
    8585        atomic_count_t refc = atomic_predec(&adata->refcount);
    8686        if (refc == 0) {
    87                 free((void *) adata->data);
     87                free(adata->data);
    8888                free(adata);
    8989        }
  • uspace/srv/audio/hound/audio_data.h

    r2ee0e4a1 r902dd4b  
    4646typedef struct {
    4747        /** Audio data */
    48         const void *data;
     48        void *data;
    4949        /** Size of the buffer pointer to by data */
    5050        size_t size;
     
    6767} audio_pipe_t;
    6868
    69 audio_data_t *audio_data_create(const void *data, size_t size,
     69audio_data_t *audio_data_create(void *data, size_t size,
    7070    pcm_format_t format);
    7171void audio_data_addref(audio_data_t *adata);
     
    114114 */
    115115static inline errno_t audio_pipe_push_data(audio_pipe_t *pipe,
    116     const void *data, size_t size, pcm_format_t f)
     116    void *data, size_t size, pcm_format_t f)
    117117{
    118118        audio_data_t *adata = audio_data_create(data, size, f);
  • uspace/srv/audio/hound/hound_ctx.c

    r2ee0e4a1 r902dd4b  
    297297 * @return Error code.
    298298 */
    299 errno_t hound_ctx_stream_write(hound_ctx_stream_t *stream, const void *data,
     299errno_t hound_ctx_stream_write(hound_ctx_stream_t *stream, void *data,
    300300    size_t size)
    301301{
  • uspace/srv/audio/hound/hound_ctx.h

    r2ee0e4a1 r902dd4b  
    7272void hound_ctx_destroy_stream(hound_ctx_stream_t *stream);
    7373
    74 errno_t hound_ctx_stream_write(hound_ctx_stream_t *stream, const void *buffer,
     74errno_t hound_ctx_stream_write(hound_ctx_stream_t *stream, void *buffer,
    7575    size_t size);
    7676errno_t hound_ctx_stream_read(hound_ctx_stream_t *stream, void *buffer, size_t size);
  • uspace/srv/audio/hound/iface.c

    r2ee0e4a1 r902dd4b  
    147147}
    148148
    149 static errno_t iface_stream_data_write(void *stream, const void *buffer, size_t size)
     149static errno_t iface_stream_data_write(void *stream, void *buffer, size_t size)
    150150{
    151151        return hound_ctx_stream_write(stream, buffer, size);
Note: See TracChangeset for help on using the changeset viewer.