NetBSD Problem Report #51286

From www@NetBSD.org  Mon Jun 27 08:10:08 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B72BD7A477
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 27 Jun 2016 08:10:08 +0000 (UTC)
Message-Id: <20160627081007.3FBD47AAB3@mollari.NetBSD.org>
Date: Mon, 27 Jun 2016 08:10:07 +0000 (UTC)
From: henning.petersen@t-online.de
Reply-To: henning.petersen@t-online.de
To: gnats-bugs@NetBSD.org
Subject: In macro delay is wrong value used.
X-Send-Pr-Version: www-1.0

>Number:         51286
>Category:       bin
>Synopsis:       In macro delay is wrong value used.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 27 08:15:01 +0000 2016
>Closed-Date:    Tue Jun 28 16:20:19 +0000 2016
>Last-Modified:  Tue Jun 28 16:20:19 +0000 2016
>Originator:     Henning Petersen
>Release:        Netbsd-current
>Organization:
>Environment:
>Description:
Value in macro delay have to be smaller as 20, as in macro delay usleep is used.
>How-To-Repeat:

>Fix:
diff -u -p -r1.28 snake.c
--- games/snake/snake/snake.c	19 Jun 2012 05:46:09 -0000	1.28
+++ games/snake/snake/snake.c	19 Dec 2015 07:03:10 -0000
@@ -892,7 +892,7 @@ pushsnake(void)
 			bonus = ((random() >> 8) & 0377) % 10;
 			mvprintw(lcnt + 1, 0, "%d\n", bonus);
 			refresh();
-			delay(30);
+			delay(19);
 			if (bonus == i) {
 				spacewarp(1);
 				logit("bonus");

>Release-Note:

>Audit-Trail:
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51286 CVS commit: src/games/snake/snake
Date: Mon, 27 Jun 2016 08:46:04 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Mon Jun 27 08:46:04 UTC 2016

 Modified Files:
 	src/games/snake/snake: snake.c

 Log Message:
 Do not pass usleep() values >= 1 million. From Henning Petersen in PR 51286


 To generate a diff of this commit:
 cvs rdiff -u -r1.28 -r1.29 src/games/snake/snake/snake.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 28 Jun 2016 16:20:19 +0000
State-Changed-Why:
fixed, thanks


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.