mirror of
https://github.com/xorgy/mediafire-fuse
synced 2026-01-13 13:14:29 -08:00
use gnu indent to enforce coding style and adapt source
- indent options are listed in ./.indent.pro - use test case to run indent
This commit is contained in:
@@ -17,23 +17,22 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "../../mfapi/apicalls.h"
|
||||
#include "../mfshell.h"
|
||||
#include "../../mfapi/folder.h"
|
||||
#include "../../mfapi/mfconn.h"
|
||||
#include "../commands.h" // IWYU pragma: keep
|
||||
#include "../commands.h" // IWYU pragma: keep
|
||||
|
||||
int
|
||||
mfshell_cmd_mkdir(mfshell *mfshell, int argc, char **argv)
|
||||
int mfshell_cmd_mkdir(mfshell * mfshell, int argc, char **argv)
|
||||
{
|
||||
int retval;
|
||||
const char *folder_curr;
|
||||
const char *name;
|
||||
int retval;
|
||||
const char *folder_curr;
|
||||
const char *name;
|
||||
|
||||
if(mfshell == NULL) return -1;
|
||||
if (mfshell == NULL)
|
||||
return -1;
|
||||
|
||||
if (argc != 2) {
|
||||
fprintf(stderr, "Invalid number of arguments\n");
|
||||
@@ -41,24 +40,25 @@ mfshell_cmd_mkdir(mfshell *mfshell, int argc, char **argv)
|
||||
}
|
||||
|
||||
name = argv[1];
|
||||
if (name == NULL) return -1;
|
||||
if (name == NULL)
|
||||
return -1;
|
||||
|
||||
folder_curr = folder_get_key(mfshell->folder_curr);
|
||||
|
||||
// safety check... this should never happen
|
||||
if(folder_curr == NULL)
|
||||
folder_set_key(mfshell->folder_curr,"myfiles");
|
||||
if (folder_curr == NULL)
|
||||
folder_set_key(mfshell->folder_curr, "myfiles");
|
||||
|
||||
// safety check... this should never happen
|
||||
if(folder_curr[0] == '\0')
|
||||
folder_set_key(mfshell->folder_curr,"myfiles");
|
||||
if (folder_curr[0] == '\0')
|
||||
folder_set_key(mfshell->folder_curr, "myfiles");
|
||||
|
||||
folder_curr = folder_get_key(mfshell->folder_curr);
|
||||
|
||||
retval = mfconn_api_folder_create(mfshell->conn,(char*)folder_curr,(char*)name);
|
||||
retval =
|
||||
mfconn_api_folder_create(mfshell->conn, (char *)folder_curr,
|
||||
(char *)name);
|
||||
mfconn_update_secret_key(mfshell->conn);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user