Replace env_strncpy() with strncpy()
authorWendy Liang <jliang@xilinx.com>
Tue, 31 May 2016 23:52:36 +0000 (16:52 -0700)
committerWendy Liang <jliang@xilinx.com>
Thu, 13 Oct 2016 05:01:42 +0000 (22:01 -0700)
Replace env_strncpy() with strncpy() standard C function.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
lib/rpmsg/rpmsg_core.c
lib/virtio/virtqueue.c

index 64501b62e26eee6324bbe1429956406e748a5d7c..dd8125eb736907cc0a9fec445cee50c59c6c22de 100644 (file)
@@ -157,7 +157,7 @@ struct rpmsg_channel *_rpmsg_create_channel(struct remote_device *rdev,
        rp_chnl = env_allocate_memory(sizeof(struct rpmsg_channel));
        if (rp_chnl) {
                memset(rp_chnl, 0x00, sizeof(struct rpmsg_channel));
-               env_strncpy(rp_chnl->name, name, sizeof(rp_chnl->name));
+               strncpy(rp_chnl->name, name, sizeof(rp_chnl->name));
                rp_chnl->src = src;
                rp_chnl->dst = dst;
                rp_chnl->rdev = rdev;
@@ -342,7 +342,7 @@ void rpmsg_send_ns_message(struct remote_device *rdev,
        rp_hdr->dst = RPMSG_NS_EPT_ADDR;
        rp_hdr->len = sizeof(struct rpmsg_ns_msg);
        ns_msg = (struct rpmsg_ns_msg *) RPMSG_LOCATE_DATA(rp_hdr);
-       env_strncpy(ns_msg->name, rp_chnl->name, sizeof(rp_chnl->name));
+       strncpy(ns_msg->name, rp_chnl->name, sizeof(rp_chnl->name));
        ns_msg->flags = flags;
        ns_msg->addr = rp_chnl->src;
 
index 663d1745fd1f9a5078644f1bad8f00f580f24730..ca46682a740071e4044c5f71910175dc603a428e 100644 (file)
@@ -84,7 +84,7 @@ int virtqueue_create(struct virtio_device *virt_dev, unsigned short id,
                memset(vq, 0x00, vq_size);
 
                vq->vq_dev = virt_dev;
-               env_strncpy(vq->vq_name, name, VIRTQUEUE_MAX_NAME_SZ);
+               strncpy(vq->vq_name, name, VIRTQUEUE_MAX_NAME_SZ);
                vq->vq_queue_index = id;
                vq->vq_alignment = ring->align;
                vq->vq_nentries = ring->num_descs;