if (port <= 0) { portstr = getenv("LOGGINGPORT"); if (portstr == NULL) port = DEFAULT_PORT; else port = atoi(portstr); }