summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
diff options
context:
space:
mode:
authorSunny Kumar <sunkumar@redhat.com>2017-12-20 13:30:39 +0530
committerAmar Tumballi <amarts@redhat.com>2017-12-21 04:30:28 +0000
commit4a06f851dcad6bdd730f3d2e12bd8f26709f27fe (patch)
tree0913f7cad0f460cf014c72a058bff79ca41b654b /xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
parent8ad87e4fa5803718746e0e7315e8c9f1a37952c0 (diff)
snapshot: fix several coverity issues in glusterd-snapshot.c
This patch fixes issues 157, 426, 428, 431, 432, 437,439, 482 from [1]. [1] https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-12-13-e255385a/html/ Change-Id: Iff9df12bd9802db29434155badb1beda045aba5b BUG: 789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
index 66133f1afdc..19a3cf7b10d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
@@ -4009,17 +4009,3 @@ glusterd_get_snap_status_str (glusterd_snap_t *snapinfo, char *snap_status_str)
out:
return ret;
}
-
-/* Safe wrapper function for strncpy.
- * This wrapper makes sure that when there is no null byte among the first n in
- * source srting for strncpy function call, the string placed in dest will be
- * null-terminated.
- */
-
-char *
-gf_strncpy (char *dest, const char *src, const size_t dest_size)
-{
- strncpy (dest, src, dest_size - 1);
- dest[dest_size - 1] = '\0';
- return dest;
-}