Ignore:
Timestamp:
2018-01-16T20:38:46Z (6 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/lib/hound/include/hound/protocol.h

    rd39c46e0 r33b8d024  
    6565errno_t hound_service_unregister_context(hound_sess_t *sess, hound_context_id_t id);
    6666
    67 errno_t hound_service_get_list(hound_sess_t *sess, const char ***ids, size_t *count,
     67errno_t hound_service_get_list(hound_sess_t *sess, char ***ids, size_t *count,
    6868    int flags, const char *connection);
    6969
     
    7777 */
    7878static inline errno_t hound_service_get_list_all(hound_sess_t *sess,
    79     const char ***ids, size_t *count, int flags)
     79    char ***ids, size_t *count, int flags)
    8080{
    8181        return hound_service_get_list(sess, ids, count, flags, NULL);
     
    106106        bool (*is_record_context)(void *, hound_context_id_t);
    107107        /** Get string identifiers of specified objects */
    108         errno_t (*get_list)(void *, const char ***, size_t *, const char *, int);
     108        errno_t (*get_list)(void *, char ***, size_t *, const char *, int);
    109109        /** Create connection between source and sink */
    110110        errno_t (*connect)(void *, const char *, const char *);
Note: See TracChangeset for help on using the changeset viewer.