Ignore:
Timestamp:
Feb 25, 2011, 9:26:54 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi-busybox/libbb/safe_strncpy.c

    r1765 r2725  
    55 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
    66 *
    7  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
     7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
    88 */
    99
     
    1111
    1212/* Like strncpy but make sure the resulting string is always 0 terminated. */
    13 char * safe_strncpy(char *dst, const char *src, size_t size)
     13char* FAST_FUNC safe_strncpy(char *dst, const char *src, size_t size)
    1414{
    1515    if (!size) return dst;
     
    1717    return strncpy(dst, src, size);
    1818}
     19
     20/* Like strcpy but can copy overlapping strings. */
     21void FAST_FUNC overlapping_strcpy(char *dst, const char *src)
     22{
     23    /* Cheap optimization for dst == src case -
     24     * better to have it here than in many callers.
     25     */
     26    if (dst != src) {
     27        while ((*dst = *src) != '\0') {
     28            dst++;
     29            src++;
     30        }
     31    }
     32}
Note: See TracChangeset for help on using the changeset viewer.