Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/string/stpcpy.c
Show All 28 Lines | |||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
*/ | */ | ||||
#include <string.h> | #include <string.h> | ||||
char * | char * | ||||
stpcpy(char * __restrict to, const char * __restrict from) | (stpcpy)(char * __restrict to, const char * __restrict from) | ||||
{ | { | ||||
for (; (*to = *from); ++from, ++to); | for (; (*to = *from); ++from, ++to); | ||||
return(to); | return(to); | ||||
} | } |