Opened 16 years ago
Closed 16 years ago
Last modified 16 years ago
#5679 closed defect (fixed)
The return value of IsMounted() is not checked
Reported by: | Owned by: | Nigel | |
---|---|---|---|
Priority: | trivial | Milestone: | unknown |
Component: | mythtv | Version: | head |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
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.
Attachments (3)
Change History (8)
Changed 16 years ago by
Attachment: | libs_libmyth-check-return.patch added |
---|
comment:1 Changed 16 years ago by
Owner: | changed from Isaac Richards to Nigel |
---|---|
Status: | new → assigned |
Good patch, Erik. I have a slightly simpler version attached (moves findMountPath() directly after isMounted() to reduce diff size). Will test and apply this week. If anyone else also has time to test, I would appreciate it.
Changed 16 years ago by
Attachment: | isMounted.patch added |
---|
comment:2 Changed 16 years ago by
comment:3 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
reworks IsMounted? and m_MountPath