[12202] in Athena Bugs

home help back first fref pref prev next nref lref last post

decmips 7.6G: hostinfo

daemon@ATHENA.MIT.EDU (sethf@MIT.EDU)
Fri Jul 8 09:02:37 1994

From: sethf@MIT.EDU
To: bugs@MIT.EDU
Date: Fri, 08 Jul 94 09:02:32 EDT

System name:		torque-wrench
Type and version:	KN02ca 7.6G
Display type:		PMAG-DV 

What were you trying to do?
	Compile "hostinfo", from the source in
/source/athena/athena.bin/hostinfo

What's wrong:
	The code is buggy

What should have happened:
	The code should not have been buggy

Please describe any relevant documentation references:
	hostinfo(1), Kernighan & Richie, "The C programming language"

	Specifically, on line 155 of hostinfo.c the code is:

		if(host_entry = (struct hostent *)0)

	This should be

		if(host_entry == (struct hostent *)0)

	Here's a patch:

*** hostinfo.c~	Fri Jul  8 08:51:22 1994
--- hostinfo.c	Fri Jul  8 08:54:55 1994
***************
*** 152,158 ****
  	    }
  	}
  
!       if(host_entry = (struct hostent *)0)
  	{
  	  host_entry = gethostbyname(hostname);
  	  if(host_entry)
--- 152,158 ----
  	    }
  	}
  
!       if(host_entry == (struct hostent *)0)
  	{
  	  host_entry = gethostbyname(hostname);
  	  if(host_entry)

home help back first fref pref prev next nref lref last post