mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
tests: Don't ignore return value of getcwd()
This commit is contained in:
parent
5f5c6a1b90
commit
58d0f4d737
@ -97,7 +97,8 @@ int main(int argc, char **argv) {
|
||||
|
||||
fprintf(log, "DAEMON:%s\n", getppid() == 1 ? "yes" : "no");
|
||||
char cwd[1024];
|
||||
getcwd(cwd, sizeof(cwd));
|
||||
if (!getcwd(cwd, sizeof(cwd)))
|
||||
return EXIT_FAILURE;
|
||||
if (strlen(cwd) > strlen("/commanddata") &&
|
||||
STREQ(cwd + strlen(cwd) - strlen("/commanddata"), "/commanddata"))
|
||||
strcpy(cwd, ".../commanddata");
|
||||
|
Loading…
x
Reference in New Issue
Block a user