[PATCH v2 1/5] ptp-gadget: Fix issue in enum_object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sometimes not all objects from the image directory are
imported. Removing this dentry->d_name zero-termination
seems to fix the problem. dentry->d_name is zero-terminated,
no need to terminate it.

Signed-off-by: Anatolij Gustschin <agust@xxxxxxx>
---
 ptp.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/ptp.c b/ptp.c
index 4c4b383..b887176 100644
--- a/ptp.c
+++ b/ptp.c
@@ -2019,7 +2019,6 @@ static int enum_objects(const char *path)
 		enum pima15740_data_format format;
 		struct tm mod_tm;
 
-		dentry->d_name[sizeof(dentry->d_name) - 1] = '\0';
 		dot = strrchr(dentry->d_name, '.');
 
 		if (!dot || dot == dentry->d_name)
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux