about summary refs log tree commit diff
path: root/nptl_db/td_thr_event_enable.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-06-19 08:38:29 +0000
committerRoland McGrath <roland@gnu.org>2003-06-19 08:38:29 +0000
commitfcaa737d49b74b7a32c031468ed256df7565c91a (patch)
tree14038e5c75ebd462df5584360a53ba92f85dff5e /nptl_db/td_thr_event_enable.c
parent6a00759b0ccfbde390331ac4908be92deeb4237b (diff)
downloadglibc-fcaa737d49b74b7a32c031468ed256df7565c91a.tar.gz
glibc-fcaa737d49b74b7a32c031468ed256df7565c91a.tar.xz
glibc-fcaa737d49b74b7a32c031468ed256df7565c91a.zip
2003-06-19 Roland McGrath <roland@redhat.com>
	* td_thr_event_enable.c (td_thr_event_enable): Use proper type `bool'
	for value written into inferior's `report_events'.
Diffstat (limited to 'nptl_db/td_thr_event_enable.c')
-rw-r--r--nptl_db/td_thr_event_enable.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nptl_db/td_thr_event_enable.c b/nptl_db/td_thr_event_enable.c
index e822453e63..badaab04d1 100644
--- a/nptl_db/td_thr_event_enable.c
+++ b/nptl_db/td_thr_event_enable.c
@@ -1,5 +1,5 @@
 /* Enable event process-wide.
-   Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 1999.
 
@@ -31,10 +31,11 @@ td_thr_event_enable (th, onoff)
   LOG ("td_thr_event_enable");
 
   /* Write the new value into the thread data structure.  */
+  const bool value = onoff != 0;
   if (ps_pdwrite (th->th_ta_p->ph,
 		  ((char *) th->th_unique
 		   + offsetof (struct pthread, report_events)),
-		  &onoff, sizeof (int)) != PS_OK)
+		  &value, sizeof value) != PS_OK)
     return TD_ERR;	/* XXX Other error value?  */
 
   return TD_OK;