Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 0e0aeb3 in mainline


Ignore:
Timestamp:
2020-08-18T00:37:11Z (4 months ago)
Author:
GitHub <noreply@…>
Parents:
7a873f0 (diff), b3c169e6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Matthieu Riolo <matthieu.riolo@…> (2020-08-18 00:37:11)
git-committer:
GitHub <noreply@…> (2020-08-18 00:37:11)
Message:

Merge b3c169e6fad6694313bf7154be767a485d10551e into 7a873f0ea2f461038b24ca00c1e0f45b52bb29c4

Location:
uspace/lib
Files:
9 added
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/adt/hash.h

    r7a873f0 r0e0aeb3  
    111111}
    112112
     113/** Calculate hash of NULL-terminated string
     114 *
     115 * TODO Modify also same file in kernel subtree?
     116 *
     117 * @param[in]  str     NULL-terminated string
     118 * @return hash of the given string
     119 */
     120static inline size_t hash_string(const char *str)
     121{
     122        size_t hash = 0;
     123        if (str != NULL) {
     124                char c;
     125                while ((c = *str++) != 0) {
     126                        hash = hash_combine(hash, c);
     127                }
     128        }
     129
     130        return hash;
     131}
     132
    113133#endif
  • uspace/lib/meson.build

    r7a873f0 r0e0aeb3  
    5353        'clui',
    5454        'compress',
     55        'conf',
    5556        'cpp',
    5657        'crypto',
Note: See TracChangeset for help on using the changeset viewer.