Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Feb 2013 14:20:04 GMT
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/175759: Correct data types for fields of struct qm_trace{} from <sys/queue.h>
Message-ID:  <201302041420.r14EK4IP068305@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/175759; it has been noted by GNATS.

From: Gleb Smirnoff <glebius@FreeBSD.org>
To: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/175759: Correct data types for fields of struct qm_trace{}
 from <sys/queue.h>
Date: Mon, 4 Feb 2013 18:14:07 +0400

 --tEFtbjk+mNEviIIX
 Content-Type: text/plain; charset=koi8-r
 Content-Disposition: inline
 
   Andrey,
 
   any additional comments for the attached patch. Is it ok from your
 viewpoint?
 
 -- 
 Totus tuus, Glebius.
 
 --tEFtbjk+mNEviIIX
 Content-Type: text/x-diff; charset=koi8-r
 Content-Disposition: attachment; filename="queue.h.diff"
 
 Index: queue.h
 ===================================================================
 --- queue.h	(revision 245741)
 +++ queue.h	(working copy)
 @@ -105,13 +105,14 @@
  #ifdef QUEUE_MACRO_DEBUG
  /* Store the last 2 places the queue element or head was altered */
  struct qm_trace {
 -	char * lastfile;
 -	int lastline;
 -	char * prevfile;
 -	int prevline;
 +	const char * lastfile;
 +	unsigned long lastline;
 +	const char * prevfile;
 +	unsigned long prevline;
  };
  
  #define	TRACEBUF	struct qm_trace trace;
 +#define	TRACEBUF_INITIALIZER	{ __FILE__, __LINE__, NULL, 0 } ,
  #define	TRASHIT(x)	do {(x) = (void *)-1;} while (0)
  #define	QMD_SAVELINK(name, link)	void **name = (void *)&(link)
  
 @@ -134,6 +135,7 @@
  #define	QMD_TRACE_HEAD(head)
  #define	QMD_SAVELINK(name, link)
  #define	TRACEBUF
 +#define	TRACEBUF_INITIALIZER
  #define	TRASHIT(x)
  #endif	/* QUEUE_MACRO_DEBUG */
  
 @@ -461,7 +463,7 @@
  }
  
  #define	TAILQ_HEAD_INITIALIZER(head)					\
 -	{ NULL, &(head).tqh_first }
 +	{ NULL, &(head).tqh_first, TRACEBUF_INITIALIZER }
  
  #define	TAILQ_ENTRY(type)						\
  struct {								\
 
 --tEFtbjk+mNEviIIX--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302041420.r14EK4IP068305>