diff options
author | Jiri Denemark <jdenemar@redhat.com> | 2010-12-03 17:10:31 +0100 |
---|---|---|
committer | Jiri Denemark <jdenemar@redhat.com> | 2010-12-06 10:12:01 +0100 |
commit | 58d0f4d737d4de688c0a473ef4a073f07d869a09 (patch) | |
tree | 2d44f71a4da02d94ba58c7dc6305d7a26e11197a /tests/commandhelper.c | |
parent | build: Fix internal docs generation in VPATH builds (diff) | |
download | libvirt-58d0f4d737d4de688c0a473ef4a073f07d869a09.tar.gz libvirt-58d0f4d737d4de688c0a473ef4a073f07d869a09.tar.bz2 libvirt-58d0f4d737d4de688c0a473ef4a073f07d869a09.zip |
tests: Don't ignore return value of getcwd()
Diffstat (limited to 'tests/commandhelper.c')
-rw-r--r-- | tests/commandhelper.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/commandhelper.c b/tests/commandhelper.c index 2ee9153d7..5b2f301f2 100644 --- a/tests/commandhelper.c +++ b/tests/commandhelper.c @@ -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"); |