test: fix printf("%s", NULL) in error path
authorRan Benita <ran@unusedvar.com>
Fri, 18 Oct 2019 21:37:48 +0000 (00:37 +0300)
committerRan Benita <ran@unusedvar.com>
Fri, 18 Oct 2019 21:38:43 +0000 (00:38 +0300)
commit45496c33f1b6ed35701625bfb0de3598c7ebe7b4
treed5fbecf343ebed2b12102ab00924e43a09bd8c20
parent076047b21acae4b430a657677de45acfddb7c055
test: fix printf("%s", NULL) in error path

    ../test/common.c: In function ‘test_get_path’:
    ../test/common.c:171:9: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
      171 |         fprintf(stderr, "Failed to allocate path (%d chars) for %s\n",
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      172 |                 (int) path_len, path);
          |                 ~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Ran Benita <ran@unusedvar.com>
test/common.c