Subject: bin/6284: usr.sbin/pkg_install/lib contains some type mismatch
To: None <gnats-bugs@gnats.netbsd.org>
From: None <h-masuda@jm3spa.felix.or.jp>
List: netbsd-bugs
Date: 10/13/1998 11:41:02
>Number:         6284
>Category:       bin
>Synopsis:       usr.sbin/pkg_install/lib contains some type mismatch
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 12 19:50:01 1998
>Last-Modified:
>Originator:     Hideo MASUDA
>Organization:
	JM3SPA, Future Engineering Laboratory of Internet connecXion
>Release:        NetBSD-current Oct 13, 1998
>Environment:
	
System: NetBSD meril.jm3spa.felix.or.jp 1.3H NetBSD 1.3H (MERIL) #1: Tue Sep 29 17:13:17 JST 1998 h-masuda@meril.jm3spa.felix.or.jp:/usr/src-current/sys/arch/alpha/compile/MERIL alpha


>Description:
	usr.sbin/pkg_install/lib contains some type mismatch
>How-To-Repeat:
	cd /usr/src/usr.sbin/pkg_install/lib; make
>Fix:
	apply following patch.

*** file.c-dist	Fri Oct  9 20:19:25 1998
--- file.c	Tue Oct 13 11:02:04 1998
***************
*** 482,488 ****
  	len = strlen(str);
  	if (fwrite(str, 1, len, fp) != len) {
  		cleanup(0);
! 		errx(2, "short fwrite on '%s', tried to write %d bytes",
  			name, len);
  	}
  	if (fclose(fp)) {
--- 482,488 ----
  	len = strlen(str);
  	if (fwrite(str, 1, len, fp) != len) {
  		cleanup(0);
! 		errx(2, "short fwrite on '%s', tried to write %ld bytes",
  			name, len);
  	}
  	if (fclose(fp)) {
*** plist.c-dist	Sat Oct 10 20:12:30 1998
--- plist.c	Tue Oct 13 11:10:45 1998
***************
*** 181,187 ****
  	plist_t *ret;
  
  	if ((ret = (plist_t *)malloc(sizeof(plist_t))) == (plist_t *) NULL) {
! 		err(1, "can't allocate %d bytes", sizeof(plist_t));
  	}
  	memset(ret, 0, sizeof(plist_t));
  	return ret;
--- 181,187 ----
  	plist_t *ret;
  
  	if ((ret = (plist_t *)malloc(sizeof(plist_t))) == (plist_t *) NULL) {
! 		err(1, "can't allocate %ld bytes", sizeof(plist_t));
  	}
  	memset(ret, 0, sizeof(plist_t));
  	return ret;
>Audit-Trail:
>Unformatted: