[Libsysio-commit] HEAD: libsysio/tests test_rename.c
Brought to you by:
lward
From: jaschut <ja...@us...> - 2003-10-28 18:54:24
|
Update of /cvsroot/libsysio/libsysio/tests In directory sc8-pr-cvs1:/tmp/cvs-serv5577 Modified Files: test_rename.c Log Message: We actually want to return an appropriate status regardless of whether the rename goes well. Index: test_rename.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/test_rename.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -b -B -p -r1.2 -r1.3 --- test_rename.c 28 Oct 2003 18:14:11 -0000 1.2 +++ test_rename.c 28 Oct 2003 18:54:19 -0000 1.3 @@ -79,7 +79,7 @@ int main(int argc, char * const argv[]) { int i; - int err = 0; + int err; const char *spath, *dpath; /* @@ -142,7 +142,8 @@ main(int argc, char * const argv[]) if (argc - optind) usage(); - if (rename(spath, dpath) != 0) + err = rename(spath, dpath); + if (err) perror("rename"); #ifndef CPLANT_YOD |