[mythtv-commits] Ticket #5679: The return value of IsMounted() is not checked

MythTV mythtv at cvs.mythtv.org
Fri Sep 5 21:58:26 UTC 2008


#5679: The return value of IsMounted() is not checked
---------------------------------------------+------------------------------
 Reporter:  Erik Hovland <erik at hovland.org>  |       Owner:  ijr    
     Type:  defect                           |      Status:  new    
 Priority:  trivial                          |   Milestone:  unknown
Component:  mythtv                           |     Version:  head   
 Severity:  low                              |     Mlocked:  0      
---------------------------------------------+------------------------------
 The member function IsMounted() is not checked every time.

 The one time it isn't, what the caller actually wants to do is initialize
 m_MountPath. So that means that IsMounted actually has a side effect and
 that effect is the only desired change that the caller wants. So I have
 gone with a fairly aggressive patch for this fix.

 The patch creates a new member function called findMountPath() that does
 the work that IsMounted() does. Then I have IsMounted() call that when
 necessary and change the caller to use this new member function.

 It also turns out that the default parameter argument of false for
 IsMounted is not a real reflection on how it is used. Only one call uses
 the default. So I changed it so the default is true and changed that call.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/5679>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list