summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-xml-output.c
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-08-21 18:21:25 +0300
committerAmar Tumballi <amarts@redhat.com>2018-08-24 16:26:36 +0000
commit036327d9e963c84a5222f8d1c7598ab36ad46a4b (patch)
tree3bbe76dab6bbf265381237024dc484d6d31f1f40 /cli/src/cli-xml-output.c
parent5acb74d7daee0fc5c501a82e604ec2abdb3cf88a (diff)
glfs-fops.c, glfs.c: strncpy() -> sprintf(), reduce strlen()'s
strncpy may not be very efficient for short strings copied into a large buffer: If the length of src is less than n, strncpy() writes additional null bytes to dest to ensure that a total of n bytes are written. Instead, use snprintf(). Also, save the result of strlen() and re-use it when possible. Compile-tested only! Change-Id: I4ecfb359cf0efaafeab245a8138f526b21613231 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'cli/src/cli-xml-output.c')
0 files changed, 0 insertions, 0 deletions