~ubuntu-branches/ubuntu/vivid/emscripten/vivid-proposed

« back to all changes in this revision

Viewing changes to system/lib/libc/musl/src/string/strlcat.c

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2014-01-19 14:12:40 UTC
  • mfrom: (4.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20140119141240-nfiw0p8033oitpfz
Tags: 1.9.0~20140119~7dc8c2f-1
* New snapshot release (Closes: #733714)
* Provide sources for javascript and flash. Done in orig-tar.sh
  Available in third_party/websockify/include/web-socket-js/src/
  (Closes: #735903)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#define _BSD_SOURCE
 
2
#include <string.h>
 
3
 
 
4
size_t strlcat(char *d, const char *s, size_t n)
 
5
{
 
6
        size_t l = strnlen(d, n);
 
7
        if (l == n) return l + strlen(s);
 
8
        return l + strlcpy(d+l, s, n-l);
 
9
}