From 4e2ad7dae18d0bd9335bf6634bea597ee6acf601 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sun, 20 May 2018 11:35:06 +0200 Subject: Fix compiler warning in conjunction with strncpy --- src/amps/frame.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/amps/frame.c') diff --git a/src/amps/frame.c b/src/amps/frame.c index b70830c..d22dcd3 100644 --- a/src/amps/frame.c +++ b/src/amps/frame.c @@ -3343,7 +3343,7 @@ static void amps_encode_focc_bits(uint64_t word_a, uint64_t word_b, char *bits) { int i, j, k; - strncpy(bits + 0, dotting, 10); + memcpy(bits + 0, dotting, 10); bits[10] = 'i'; strcpy(bits + 11, sync_word); bits[22] = 'i'; @@ -3391,10 +3391,10 @@ static void amps_encode_fvc_bits(uint64_t word_a, char *bits) k = 0; for (i = 0; i < 11; i++) { if (i == 0) { - strncpy(bits + k, dotting, 101); + memcpy(bits + k, dotting, 101); k += 101; } else { - strncpy(bits + k, dotting, 37); + memcpy(bits + k, dotting, 37); k += 37; } strcpy(bits + k, sync_word); -- cgit v1.2.3