git://git.jankratochvil.net
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update for HEAD-2003091401
[reactos.git]
/
tools
/
rtouch.c
diff --git
a/tools/rtouch.c
b/tools/rtouch.c
index
ce1773c
..
1d9c7c6
100755
(executable)
--- a/
tools/rtouch.c
+++ b/
tools/rtouch.c
@@
-42,7
+42,7
@@
char* convert_path(char* origpath)
int main(int argc, char* argv[])
{
char* path;
int main(int argc, char* argv[])
{
char* path;
-
FILE* file
;
+
int id
;
#ifdef WIN32
time_t now;
struct utimbuf fnow;
#ifdef WIN32
time_t now;
struct utimbuf fnow;
@@
-55,21
+55,21
@@
int main(int argc, char* argv[])
}
path = convert_path(argv[1]);
}
path = convert_path(argv[1]);
-
file = (FILE *)
open(path, S_IWRITE);
- if (
file == (void*)-1
)
+
id =
open(path, S_IWRITE);
+ if (
id < 0
)
{
{
-
file = (FILE *)
open(path, S_IWRITE | O_CREAT);
- if (
file == (void*)-1
)
+
id =
open(path, S_IWRITE | O_CREAT);
+ if (
id < 0
)
{
fprintf(stderr, "Cannot create file.\n");
exit(1);
}
}
{
fprintf(stderr, "Cannot create file.\n");
exit(1);
}
}
-
fclose(file
);
+
close(id
);
#ifdef WIN32
#ifdef WIN32
- now = time();
+ now = time(
NULL
);
fnow.actime = now;
fnow.modtime = now;
(int) utime(path, &fnow);
fnow.actime = now;
fnow.modtime = now;
(int) utime(path, &fnow);