Fix warning in test_escape_slashes
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Mon, 14 Oct 2019 15:36:55 +0000 (17:36 +0200)
committerMatthias Runge <mrunge@redhat.com>
Wed, 16 Oct 2019 06:50:32 +0000 (08:50 +0200)
commitd5edf1e82feb80cfe90cfa35501eef3c8dc493e5
treee369e6f3c282bdb91ff87397e11e1a523129be17
parent2c42f265e1af8b586f675aa40be0ac373e8deaf3
Fix warning in test_escape_slashes

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

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