Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2962c8a authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Remove dead code.

If this was strlcpy16 it wouldn't be such a bad idea, but strncpy16 is
just an accident waiting to happen...

Test: N/A
Change-Id: Id296fdeadfb9f1f70ddc8fb6d31b3b6b5178a12c
parent a5e0d695
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -275,25 +275,6 @@ size_t strlen16(const char16_t *s)
  return ss-s;
}


char16_t *strncpy16(char16_t *dst, const char16_t *src, size_t n)
{
  char16_t *q = dst;
  const char16_t *p = src;
  char ch;

  while (n) {
    n--;
    *q++ = ch = *p++;
    if ( !ch )
      break;
  }

  *q = 0;

  return dst;
}

size_t strnlen16(const char16_t *s, size_t maxlen)
{
  const char16_t *ss = s;
+0 −1
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ int strncmp16(const char16_t *s1, const char16_t *s2, size_t n);
size_t strlen16(const char16_t *);
size_t strnlen16(const char16_t *, size_t);
char16_t *strcpy16(char16_t *, const char16_t *);
char16_t *strncpy16(char16_t *, const char16_t *, size_t);
char16_t *strstr16(const char16_t*, const char16_t*);

// Version of comparison that supports embedded NULs.