removed 1 superflous null ptr check
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10145 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -98,7 +98,7 @@ int sierra_change_folder (Camera *camera, const char *folder, GPContext *context
|
||||
|
||||
/* We will later need a path ending with '/'. */
|
||||
memset (target, 0, sizeof (target));
|
||||
if (folder && folder[0])
|
||||
if (folder[0])
|
||||
strncpy (target, folder, sizeof (target) - 1);
|
||||
if (target[strlen (target) - 1] != '/')
|
||||
strcat (target, "/");
|
||||
|
||||
Reference in New Issue
Block a user