is it a good strlcat() implementation? I'd like to know if i respect strlcat(3) behiour with my implementation, cause i'm not really sure to understand strlcat particular behaviour

int my_strlcat(char *dest, char *src, int size)
{
  int i;
  int src_len;
  int dest_len;

  i = 0;
  dest_len = strlen(dest);
  src_len = strlen(src);
  if (size &lt;= 0)
   return dest_len;
  while (dest_len &lt; size)
  {
    dest[dest_len] = src[i];
    dest_len++;
    i++;
  }
  dest[dest_len] = '\0';
  return (strlen(dest));
}
src_len is not used..
the strlen in the return statement is not needed.. you know the length from dest_len.


IMHO very weird implementation :)