Fix warning in test_escape_string
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Mon, 14 Oct 2019 15:38:03 +0000 (17:38 +0200)
committerMatthias Runge <mrunge@redhat.com>
Wed, 16 Oct 2019 06:50:42 +0000 (08:50 +0200)
commit52e8daca0c0b53c61c31fe9ea058b08e6eb7c2b1
tree3d505c7aa7c27e32f0530f218b44866bd84ae32f
parentd5edf1e82feb80cfe90cfa35501eef3c8dc493e5
Fix warning in test_escape_string

In function ‘test_escape_string’,
    inlined from ‘main’ at src/utils/common/common_test.c:384:3:
src/utils/common/common_test.c:226:5: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation]
  226 |     strncpy(buffer, cases[i].str, sizeof(buffer));
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

(cherry picked from commit 737ffc08e2d9f3d3dda40a51329881085070863e)
src/utils/common/common_test.c