Ignore:
Timestamp:
2018-01-16T20:38:46Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2467b41
Parents:
d39c46e0
Message:

Remove const qualifier from the argument of free() and realloc(),
as well as in numerous other variables that hold ownership of memory.

By convention, a pointer that holds ownership is _never_ qualified by const.
This is reflected in the standard type signature of free() and realloc().
Allowing const pointers to hold ownership may seem superficially convenient,
but is actually quite confusing to experienced C programmers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/audio/hound/audio_source.h

    rd39c46e0 r33b8d024  
    4949        list_t connections;
    5050        /** String identifier */
    51         const char *name;
     51        char *name;
    5252        /** audio data format */
    5353        pcm_format_t format;
     
    7575    const pcm_format_t *f);
    7676void audio_source_fini(audio_source_t *source);
    77 errno_t audio_source_push_data(audio_source_t *source, const void *data,
     77errno_t audio_source_push_data(audio_source_t *source, void *data,
    7878    size_t size);
    7979static inline const pcm_format_t *audio_source_format(const audio_source_t *s)
Note: See TracChangeset for help on using the changeset viewer.