From de06d35429098ab11024740a9f3f260f099c207d Mon Sep 17 00:00:00 2001 From: Breno Leitao Date: Jun 20 2018 18:41:24 +0000 Subject: harness: Fix strncpy argument Argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source, instead of the destination. Signed-off-by: Breno Leitao --- diff --git a/harness/cases/19.t b/harness/cases/19.t index 4989510..5c3e0d6 100644 --- a/harness/cases/19.t +++ b/harness/cases/19.t @@ -41,7 +41,7 @@ open_temp_file(void) int fd; char template[sizeof(TEMPLATE)]; - strncpy(template, TEMPLATE, sizeof(TEMPLATE)); + strncpy(template, TEMPLATE, sizeof(template)); fd = mkostemp(template, O_DIRECT); if (fd < 0) { perror("mkstemp");