Skip to content

Commit 6748f1d

Browse files
committed
cosmetic : white spaces.
1 parent 35a581b commit 6748f1d

File tree

5 files changed

+62
-62
lines changed

5 files changed

+62
-62
lines changed

inc/logs_out.h

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@ void timestamp(char * timestr, int maxsize);
4545

4646
#ifdef USE_SYSLOG // Syslog usage
4747

48-
#define PRINT_MSG(fmt, args...) syslog(LOG_NOTICE, "[uMTPrd - Info] " fmt "\n", \
49-
## args)
48+
#define PRINT_MSG(fmt, args...) syslog(LOG_NOTICE, "[uMTPrd - Info] " fmt "\n", \
49+
## args)
5050
#define PRINT_ERROR(fmt, args...) syslog(LOG_ERR, "[uMTPrd - Error] " fmt "\n", \
51-
## args)
51+
## args)
5252
#define PRINT_WARN(fmt, args...) syslog(LOG_WARNING, "[uMTPrd - Warning] " fmt "\n", \
53-
## args)
53+
## args)
5454
#ifdef DEBUG
5555

5656
#define PRINT_DEBUG(fmt, args...) syslog(LOG_DEBUG, "[uMTPrd - Debug] " fmt "\n", \
57-
## args)
57+
## args)
5858
#else
5959

6060
#define PRINT_DEBUG(fmt, args...)
@@ -63,42 +63,42 @@ void timestamp(char * timestr, int maxsize);
6363

6464
#else // Stdout usage
6565

66-
#define PRINT_MSG(fmt, args...) do { \
67-
char timestr[32]; \
68-
timestamp((char*)&timestr, sizeof(timestr)); \
69-
fprintf(stdout, \
70-
"[uMTPrd - %s - Info] " fmt "\n",(char*)&timestr, \
71-
## args); \
72-
fflush(stdout); \
73-
} while (0)
74-
75-
#define PRINT_ERROR(fmt, args...) do { \
76-
char timestr[32]; \
77-
timestamp((char*)&timestr, sizeof(timestr)); \
78-
fprintf(stderr, \
79-
"[uMTPrd - %s - Error] " fmt "\n",(char*)&timestr, \
80-
## args); \
81-
fflush(stderr); \
82-
} while (0)
83-
84-
#define PRINT_WARN(fmt, args...) do { \
85-
char timestr[32]; \
86-
timestamp((char*)&timestr, sizeof(timestr)); \
87-
fprintf(stdout, \
88-
"[uMTPrd - %s - Warning] " fmt "\n",(char*)&timestr, \
89-
## args); \
90-
fflush(stdout); \
91-
} while (0)
66+
#define PRINT_MSG(fmt, args...) do { \
67+
char timestr[32]; \
68+
timestamp((char*)&timestr, sizeof(timestr)); \
69+
fprintf(stdout, \
70+
"[uMTPrd - %s - Info] " fmt "\n",(char*)&timestr, \
71+
## args); \
72+
fflush(stdout); \
73+
} while (0)
74+
75+
#define PRINT_ERROR(fmt, args...) do { \
76+
char timestr[32]; \
77+
timestamp((char*)&timestr, sizeof(timestr)); \
78+
fprintf(stderr, \
79+
"[uMTPrd - %s - Error] " fmt "\n",(char*)&timestr, \
80+
## args); \
81+
fflush(stderr); \
82+
} while (0)
83+
84+
#define PRINT_WARN(fmt, args...) do { \
85+
char timestr[32]; \
86+
timestamp((char*)&timestr, sizeof(timestr)); \
87+
fprintf(stdout, \
88+
"[uMTPrd - %s - Warning] " fmt "\n",(char*)&timestr, \
89+
## args); \
90+
fflush(stdout); \
91+
} while (0)
9292

9393
#ifdef DEBUG
94-
#define PRINT_DEBUG(fmt, args...) do { \
95-
char timestr[32]; \
96-
timestamp((char*)&timestr, sizeof(timestr)); \
97-
fprintf(stdout, \
98-
"[uMTPrd - %s - Debug] " fmt "\n",(char*)&timestr, \
99-
## args); \
100-
fflush(stdout); \
101-
} while (0)
94+
#define PRINT_DEBUG(fmt, args...) do { \
95+
char timestr[32]; \
96+
timestamp((char*)&timestr, sizeof(timestr)); \
97+
fprintf(stdout, \
98+
"[uMTPrd - %s - Debug] " fmt "\n",(char*)&timestr, \
99+
## args); \
100+
fflush(stdout); \
101+
} while (0)
102102
#else
103103

104104
#define PRINT_DEBUG(fmt, args...)

src/mtp.c

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -722,10 +722,10 @@ uint32_t mtp_add_storage(mtp_ctx * ctx, char * path, char * description, int uid
722722

723723
ctx->storages[i].storage_id = 0xFFFF0000 + (i + 1);
724724
PRINT_DEBUG("mtp_add_storage : Storage %.8X mapped to %s (%s) (Flags: 0x%.8X)",
725-
ctx->storages[i].storage_id,
726-
ctx->storages[i].root_path,
727-
ctx->storages[i].description,
728-
ctx->storages[i].flags);
725+
ctx->storages[i].storage_id,
726+
ctx->storages[i].root_path,
727+
ctx->storages[i].description,
728+
ctx->storages[i].flags);
729729

730730
return ctx->storages[i].storage_id;
731731
}
@@ -785,8 +785,8 @@ uint32_t mtp_get_storage_id_by_name(mtp_ctx * ctx, char * name)
785785
if( !strcmp(ctx->storages[i].description, name ) )
786786
{
787787
PRINT_DEBUG("%s : %s -> %.8X",
788-
__func__,
789-
ctx->storages[i].root_path,
788+
__func__,
789+
ctx->storages[i].root_path,
790790
ctx->storages[i].storage_id);
791791

792792
return ctx->storages[i].storage_id;
@@ -812,8 +812,8 @@ int mtp_get_storage_index_by_name(mtp_ctx * ctx, char * name)
812812
if( !strcmp(ctx->storages[i].description, name ) )
813813
{
814814
PRINT_DEBUG("%s : %s -> %.8X",
815-
__func__,
816-
ctx->storages[i].root_path,
815+
__func__,
816+
ctx->storages[i].root_path,
817817
i);
818818

819819
return i;
@@ -839,9 +839,9 @@ int mtp_get_storage_index_by_id(mtp_ctx * ctx, uint32_t storage_id)
839839
if( ctx->storages[i].storage_id == storage_id )
840840
{
841841
PRINT_DEBUG("%s : %.8X -> %d",
842-
__func__,
843-
storage_id,
844-
i );
842+
__func__,
843+
storage_id,
844+
i );
845845
return i;
846846
}
847847
}
@@ -865,9 +865,9 @@ char * mtp_get_storage_root(mtp_ctx * ctx, uint32_t storage_id)
865865
if( ctx->storages[i].storage_id == storage_id )
866866
{
867867
PRINT_DEBUG("%s : %.8X -> %s",
868-
__func__,
869-
storage_id,
870-
ctx->storages[i].root_path );
868+
__func__,
869+
storage_id,
870+
ctx->storages[i].root_path );
871871
return ctx->storages[i].root_path;
872872
}
873873
}
@@ -890,9 +890,9 @@ char * mtp_get_storage_description(mtp_ctx * ctx, uint32_t storage_id)
890890
if( ctx->storages[i].storage_id == storage_id )
891891
{
892892
PRINT_DEBUG("%s : %.8X -> %s",
893-
__func__,
894-
storage_id,
895-
ctx->storages[i].description );
893+
__func__,
894+
storage_id,
895+
ctx->storages[i].description );
896896
return ctx->storages[i].description;
897897
}
898898
}
@@ -916,9 +916,9 @@ uint32_t mtp_get_storage_flags(mtp_ctx * ctx, uint32_t storage_id)
916916
if( ctx->storages[i].storage_id == storage_id )
917917
{
918918
PRINT_DEBUG("%s : %.8X -> 0x%.8X",
919-
__func__,
920-
storage_id,
921-
ctx->storages[i].flags );
919+
__func__,
920+
storage_id,
921+
ctx->storages[i].flags );
922922
return ctx->storages[i].flags;
923923
}
924924
}

src/mtp_cfg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ int test_flag(char * str, char * flag, char * param)
233233
if(!strncmp(&str[i],flag,strlen(flag)))
234234
{
235235
if( (previous_char == 0 || previous_char == ',') && \
236-
(str[i + flaglen] == 0 || str[i + flaglen] == ',' || str[i + flaglen] == '=') )
236+
(str[i + flaglen] == 0 || str[i + flaglen] == ',' || str[i + flaglen] == '=') )
237237
{
238238
if(param && str[i + flaglen] == '=')
239239
{

src/mtp_operations/mtp_op_getdeviceinfos.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ uint32_t mtp_op_GetDeviceInfos(mtp_ctx * ctx,MTP_PACKET_HEADER * mtp_packet_hdr,
4141
{
4242
int sz,tmp_sz;
4343

44-
// Note : From the MTP specification this operation can be used without first
44+
// Note : From the MTP specification this operation can be used without first
4545
// opening an MTP session by sending an OpenSession command !
4646

4747
sz = build_response(ctx, mtp_packet_hdr->tx_id, MTP_CONTAINER_TYPE_DATA, mtp_packet_hdr->code, ctx->wrbuffer, ctx->usb_wr_buffer_max_size,0,0);

src/usbstring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ int unicode2charstring(char * str, uint16_t * unicodestr, int maxstrsize)
221221
byte_access += 2;
222222

223223
if(!chunksize)
224-
{ // Error -> default character
224+
{ // Error -> default character
225225
tmpstr[0] = '?';
226226
tmpstr[1] = 0;
227227
chunksize = 1;

0 commit comments

Comments
 (0)