Commit 22c06244 authored by Roland Haas's avatar Roland Haas
Browse files

mpitar: avoid compiler warning about strncpy

even though I am using strncpy exactly as designed, sufficiently many
people seem to not do so and gcc complains, so I used memcpy instead
parent b8395d36
......@@ -260,8 +260,8 @@ void tarentry::make_ustar_header_block(ustar_hdr &hdr, const int xtype,
assert(0);
// link name already set
strncpy(hdr.magic, TMAGIC, sizeof(hdr.magic));
strncpy(hdr.version, TVERSION, sizeof(hdr.version));
memcpy(hdr.magic, TMAGIC, sizeof(hdr.magic));
memcpy(hdr.version, TVERSION, sizeof(hdr.version));
if(!xtype) {
snprintf(hdr.uname, sizeof(hdr.uname), "%s", pwd->pw_name);
snprintf(hdr.gname, sizeof(hdr.gname), "%s", grp->gr_name);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment