← Commit list

3719e9e79

Eric Andersen
Eric Andersen
2003-03-07
SUCCESS Duration: 56s

Subject

Scrub things a bit, shave off a few bytes. -Erik

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Debian 14.2.0-19) 14.2.0

—

Build Log

(log yok)

Commit Diff GitHub →

util-linux/fdflush.c+9 -6
@@ -2,7 +2,8 @@
/*
* Mini fdflush implementation for busybox
*
- * Copyright (C) 1995, 1996 by Bruce Perens <[email protected]>.
+ * Copyright (C) 1995, 1996 by Bruce Perens <[email protected]>.
+ * Copyright (C) 2003 by Erik Andersen <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -33,14 +34,16 @@ extern int fdflush_main(int argc, char **argv)
{
int fd;
- if (argc <= 1 || **(++argv) == '-')
+ if (argc <= 1)
show_usage();
-
- if ((fd = open(*argv, 0)) < 0)
- perror_msg_and_die("%s", *argv);
+ if ((fd = open(*(++argv), 0)) < 0)
+ goto die_the_death;
if (ioctl(fd, FDFLUSH, 0))
- perror_msg_and_die("%s", *argv);
+ goto die_the_death;
return EXIT_SUCCESS;
+
+die_the_death:
+ perror_msg_and_die(NULL);
}