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

Changeset 26f90d14 in mainline


Ignore:
Timestamp:
2020-07-22T21:50:29Z (2 weeks ago)
Author:
GitHub <noreply@…>
Parents:
37d4c91 (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-07-22 21:50:29)
git-committer:
GitHub <noreply@…> (2020-07-22 21:50:29)
Message:

Merge b3c169e6fad6694313bf7154be767a485d10551e into 37d4c915fb39ff74e65cfe063a2abfd05093b32d

Location:
uspace/lib
Files:
9 added
2 edited

Legend:

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

    r37d4c91 r26f90d14  
    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

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