summaryrefslogtreecommitdiff
path: root/lib/ZGetWGPort.c
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1988-07-26 12:41:02 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1988-07-26 12:41:02 +0000
commit9d620ebf4b4dc6a1d37e4adf8f15c846f32c3e8a (patch)
treec59e0855bba89d90a72c702f1bc3ab5f96fc8aa2 /lib/ZGetWGPort.c
parent7b353390544ac903546a971fb83da2bcffc17e95 (diff)
revert to previous rev 1.3, using int's instead of shorts.
There was no way to return port #65535.
Diffstat (limited to 'lib/ZGetWGPort.c')
-rw-r--r--lib/ZGetWGPort.c6
1 files changed, 3 insertions, 3 deletions
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);