FreeBSD/contrib/ntp/util/tickadj.c
/*
 * writevar - write a variable into the file
 */
write a variable into the file
write a variable into the file
static void
writevar(
	int ofd,
	off_t off,
	int var
	)
{
	if (lseek(ofd, off, L_SET) == -1)
	{
		(void) fprintf(stderr, "%s: lseek fails: ", progname);
		perror("");
		exit(1);
	}
	if (write(ofd, (char *)&var, sizeof(int)) != sizeof(int))
	{
		(void) fprintf(stderr, "%s: write fails: ", progname);
		perror("");
		exit(1);
	}
	return;
}
static void writevar ( int ofd , off_t off , int var ) { if ( lseek ( ofd , off , L_SET ) == -1 ) { ( void ) fprintf ( stderr , " " , progname ) ; perror ( " " ) ; exit ( 1 ) ; } if ( write ( ofd , ( char * ) & var , sizeof ( int ) ) != sizeof ( int ) ) { ( void ) fprintf ( stderr , " " , progname ) ; perror ( " " ) ; exit ( 1 ) ; } return ; }
writevar - write a variable into the file
writevar - write a variable into the file