removed unused return value

This commit is contained in:
oy 2019-01-18 18:53:49 +01:00
parent 9efa13c036
commit de73018730
2 changed files with 6 additions and 9 deletions

View file

@ -1412,7 +1412,7 @@ int net_init()
return 0;
}
int fs_listdir(const char *dir, FS_LISTDIR_CALLBACK cb, int type, void *user)
void fs_listdir(const char *dir, FS_LISTDIR_CALLBACK cb, int type, void *user)
{
#if defined(CONF_FAMILY_WINDOWS)
WIN32_FIND_DATA finddata;
@ -1424,7 +1424,7 @@ int fs_listdir(const char *dir, FS_LISTDIR_CALLBACK cb, int type, void *user)
handle = FindFirstFileA(buffer, &finddata);
if (handle == INVALID_HANDLE_VALUE)
return 0;
return;
str_format(buffer, sizeof(buffer), "%s/", dir);
length = str_length(buffer);
@ -1439,7 +1439,7 @@ int fs_listdir(const char *dir, FS_LISTDIR_CALLBACK cb, int type, void *user)
while (FindNextFileA(handle, &finddata));
FindClose(handle);
return 0;
return;
#else
struct dirent *entry;
char buffer[1024*2];
@ -1447,7 +1447,7 @@ int fs_listdir(const char *dir, FS_LISTDIR_CALLBACK cb, int type, void *user)
DIR *d = opendir(dir);
if(!d)
return 0;
return;
str_format(buffer, sizeof(buffer), "%s/", dir);
length = str_length(buffer);
@ -1461,7 +1461,7 @@ int fs_listdir(const char *dir, FS_LISTDIR_CALLBACK cb, int type, void *user)
/* close the directory and return */
closedir(d);
return 0;
return;
#endif
}

View file

@ -1138,12 +1138,9 @@ void str_timestamp(char *buffer, int buffer_size);
cb - Callback function to call for each entry
type - Type of the directory
user - Pointer to give to the callback
Returns:
Always returns 0.
*/
typedef int (*FS_LISTDIR_CALLBACK)(const char *name, int is_dir, int dir_type, void *user);
int fs_listdir(const char *dir, FS_LISTDIR_CALLBACK cb, int type, void *user);
void fs_listdir(const char *dir, FS_LISTDIR_CALLBACK cb, int type, void *user);
/*
Function: fs_makedir