[BusyBox-cvs] svn commit: trunk/busybox/networking

vapier at busybox.net vapier at busybox.net
Mon Apr 18 18:52:16 UTC 2005


Author: vapier
Date: 2005-04-18 12:52:15 -0600 (Mon, 18 Apr 2005)
New Revision: 10133

Log:
touchups as suggested by Vladimir N. Oleynik

Modified:
   trunk/busybox/networking/fakeidentd.c


Changeset:
Modified: trunk/busybox/networking/fakeidentd.c
===================================================================
--- trunk/busybox/networking/fakeidentd.c	2005-04-18 15:59:49 UTC (rev 10132)
+++ trunk/busybox/networking/fakeidentd.c	2005-04-18 18:52:15 UTC (rev 10133)
@@ -74,14 +74,14 @@
  * FD of the connection is always the index of the connection structure
  * in `conns' array + FCS
  */
-struct {
+static struct {
 	char buf[20];
 	int len;
 	time_t lasttime;
 } conns[MAXCONNS];
 
 /* When using global variables, bind those at least to a structure. */
-struct {
+static struct {
 	const char *identuser;
 	fd_set readfds;
 	int conncnt;
@@ -274,15 +274,7 @@
 	FD_SET(0, &G.readfds);
 
 	/* handle -b <ip> parameter */
-	while ((flag = getopt(argc, argv, "b:")) != EOF) {
-		switch (flag) {
-		case 'b':
-			bind_ip_address = optarg;
-			break;
-		default:
-			bb_show_usage();
-		}
-	}
+	bb_getopt_ulflags(argc, argv, "b:", &bind_ip_address);
 	/* handle optional REPLY STRING */
 	if (optind < argc)
 		G.identuser = argv[optind];
@@ -293,6 +285,7 @@
 	if (godaemon() == 0)
 		return 0;
 
+	/* main loop where we process all events and never exit */
 	while (1) {
 	fd_set rfds = G.readfds;
 	struct timeval tv = { 15, 0 };




More information about the busybox-cvs mailing list