This is the mail archive of the
sid@sources.redhat.com
mailing list for the SID project.
[patch] logger::delete_saved_messages
- From: Dave Brolley <brolley at redhat dot com>
- To: sid at sources dot redhat dot com
- Date: Wed, 17 Dec 2003 14:58:18 -0500
- Subject: [patch] logger::delete_saved_messages
- Organization: Red Hat Canada, Ltd
This corrects the clearing of saved_messages and saved_levels. The
previous code was just plain incorrect and caused memory access problems
on some platforms.
Dave
2003-12-17 Dave Brolley <brolley@redhat.com>
* sidmiscutil.h (delete_saved_messages): Use 'clear' method.
Index: sid/include/sidmiscutil.h
===================================================================
RCS file: /cvs/src/src/sid/include/sidmiscutil.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -c -p -r1.7 -r1.8
*** sid/include/sidmiscutil.h 21 Oct 2003 21:38:24 -0000 1.7
--- sid/include/sidmiscutil.h 17 Dec 2003 19:51:02 -0000 1.8
***************
*** 1,6 ****
// sidmiscutil.h - Useful utility classes. -*- C++ -*-
! // Copyright (C) 1999-2002 Red Hat.
// This file is part of SID and is licensed under the GPL.
// See the file COPYING.SID for conditions for redistribution.
--- 1,6 ----
// sidmiscutil.h - Useful utility classes. -*- C++ -*-
! // Copyright (C) 1999-2003 Red Hat.
// This file is part of SID and is licensed under the GPL.
// See the file COPYING.SID for conditions for redistribution.
*************** namespace sidutil
*** 526,532 ****
public:
void delete_saved_messages ()
{
! saved_messages.erase (saved_messages.end ());
}
};
--- 526,533 ----
public:
void delete_saved_messages ()
{
! saved_messages.clear ();
! saved_levels.clear ();
}
};