Commit ee3e81a6 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

compacted conditionals and assignments in _print_ns

parent fe4700e0
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -41,17 +41,12 @@ _print_ns(res_state res)
	time_t now = time(NULL);
	unsigned int i;

	logfile = getenv("RESOLV_NS_OVERRIDE_LOG");
	if (logfile == NULL)
	if ( NULL == ( logfile = getenv("RESOLV_NS_OVERRIDE_LOG") ))
		return;

	if (strcmp("-", logfile) == 0) {
		log = stderr;
	} else {
		log = fopen(logfile, "a");
	}

	if (log == NULL) {
	} else if ( NULL == ( log = fopen(logfile, "a") )) {
		error(0, errno, "could not open log file %s", logfile);
		return;
	}