[BusyBox-cvs] busybox/util-linux fdflush.c,1.19,1.20

Erik Andersen andersen at codepoet.org
Fri Mar 7 18:03:06 UTC 2003


Update of /var/cvs/busybox/util-linux
In directory winder:/tmp/cvs-serv18267

Modified Files:
	fdflush.c 
Log Message:
Scrub things a bit, shave off a few bytes. 
 -Erik


Index: fdflush.c
===================================================================
RCS file: /var/cvs/busybox/util-linux/fdflush.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- fdflush.c	13 Apr 2002 08:31:59 -0000	1.19
+++ fdflush.c	7 Mar 2003 18:03:02 -0000	1.20
@@ -2,7 +2,8 @@
 /*
  * Mini fdflush implementation for busybox
  *
- * Copyright (C) 1995, 1996 by Bruce Perens <bruce at pixar.com>.
+ * Copyright (C) 1995, 1996 by Bruce Perens <bruce at perens.com>.
+ * Copyright (C) 2003 by Erik Andersen <andersen at codeoet.org>
  *
  * 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 @@
 {
 	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);
 }




More information about the busybox-cvs mailing list