From 9d620ebf4b4dc6a1d37e4adf8f15c846f32c3e8a Mon Sep 17 00:00:00 2001 From: John Kohl Date: Tue, 26 Jul 1988 12:41:02 +0000 Subject: revert to previous rev 1.3, using int's instead of shorts. There was no way to return port #65535. --- lib/ZGetWGPort.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/ZGetWGPort.c') diff --git a/lib/ZGetWGPort.c b/lib/ZGetWGPort.c index b9901f8..c2d28e8 100644 --- a/lib/ZGetWGPort.c +++ b/lib/ZGetWGPort.c @@ -23,11 +23,11 @@ static char rcsid_ZGetWGPort_c[] = "$Header$"; extern char *getenv(); extern uid_t getuid(); -short ZGetWGPort() +int ZGetWGPort() { char *envptr, name[128]; FILE *fp; - short wgport; + int wgport; envptr = getenv("WGFILE"); if (!envptr) { @@ -38,7 +38,7 @@ short ZGetWGPort() return (-1); /* if fscanf fails, return -1 via wgport */ - if (fscanf(fp, "%hd", &wgport) != 1) + if (fscanf(fp, "%d", &wgport) != 1) wgport = -1; (void) fclose(fp); -- cgit v1.2.3