mirror of
https://github.com/sheumann/hush.git
synced 2025-01-03 00:31:16 +00:00
- small size tweak
This commit is contained in:
parent
1118a1de46
commit
d19f4aaa21
@ -29,10 +29,8 @@
|
|||||||
int touch_main(int argc, char **argv)
|
int touch_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
int flags;
|
|
||||||
int status = EXIT_SUCCESS;
|
int status = EXIT_SUCCESS;
|
||||||
|
bool flags = (getopt32(argc, argv, "c") & 1);
|
||||||
flags = getopt32(argc, argv, "c");
|
|
||||||
|
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
@ -43,7 +41,7 @@ int touch_main(int argc, char **argv)
|
|||||||
do {
|
do {
|
||||||
if (utime(*argv, NULL)) {
|
if (utime(*argv, NULL)) {
|
||||||
if (errno == ENOENT) { /* no such file*/
|
if (errno == ENOENT) { /* no such file*/
|
||||||
if (flags & 1) { /* Creation is disabled, so ignore. */
|
if (flags) { /* Creation is disabled, so ignore. */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* Try to create the file. */
|
/* Try to create the file. */
|
||||||
|
Loading…
Reference in New Issue
Block a user