Commits

Anonymous committed ff0f9af Merge

merge upstream changes

Comments (0)

Files changed (1)

 static char message[PIPE_BUF]; /* message buf used for communication */
 
 static void usage() {
-	fprintf(stderr, "%s",
-			"ii - irc it - " VERSION "\n"
-			"(C)opyright MMV-MMVI Anselm R. Garbe\n"
-			"(C)opyright MMV-MMXI Nico Golde\n"
-			"usage: ii [-i <irc dir>] [-s <host>] [-p <port>]\n"
-			"          [-n <nick>] [-k <password>] [-f <fullname>]\n");
-	exit(EXIT_SUCCESS);
+	fputs("ii - irc it - " VERSION "\n"
+	      "(C)opyright MMV-MMVI Anselm R. Garbe\n"
+	      "(C)opyright MMV-MMXI Nico Golde\n"
+	      "usage: ii [-i <irc dir>] [-s <host>] [-p <port>]\n"
+	      "          [-n <nick>] [-k <password>] [-f <fullname>]\n", stderr);
+	exit(EXIT_FAILURE);
 }
 
 static char *striplower(char *s) {
 
 static void create_filepath(char *filepath, size_t len, char *channel, char *suffix) {
 	if(!get_filepath(filepath, len, striplower(channel), suffix)) {
-		fprintf(stderr, "%s", "ii: path to irc directory too long\n");
+		fputs("ii: path to irc directory too long\n", stderr);
 		exit(EXIT_FAILURE);
 	}
 }
 	char prefix[_POSIX_PATH_MAX];
 
 	if(!spw) {
-		fprintf(stderr,"ii: getpwuid() failed\n");
+		fputs("ii: getpwuid() failed\n", stderr);
 		exit(EXIT_FAILURE);
 	}
 	snprintf(nick, sizeof(nick), "%s", spw->pw_name);
 
 	irc = tcpopen(port);
 	if(!snprintf(path, sizeof(path), "%s/%s", prefix, host)) {
-		fprintf(stderr, "%s", "ii: path to irc directory too long\n");
+		fputs("ii: path to irc directory too long\n", stderr);
 		exit(EXIT_FAILURE);
 	}
 	create_dirtree(path);
 	login(key, fullname);
 	run();
 
-	return 0;
+	return EXIT_SUCCESS;
 }