Skip to content
Permalink
Browse files

Fixed LGTM formatting alert (#3987)

  • Loading branch information...
CairoLee authored and Lemongrass3110 committed Mar 17, 2019
1 parent 232b388 commit bf27041e7bb2ae2adc214f7fd4917a51e554056a
Showing with 9 additions and 9 deletions.
  1. +2 −2 src/common/sql.cpp
  2. +1 −1 src/common/timer.cpp
  3. +2 −2 src/common/utils.cpp
  4. +1 −1 src/login/loginchrif.cpp
  5. +3 −3 src/map/status.cpp
@@ -564,7 +564,7 @@ static void Sql_P_ShowDebugMysqlFieldInfo(const char* prefix, enum enum_field_ty
switch( type )
{
default:
ShowDebug("%stype=%s%u, length=%d\n", prefix, sign, type, length);
ShowDebug("%stype=%s%u, length=%lu\n", prefix, sign, type, length);
return;
#define SHOW_DEBUG_OF(x) case x: type_string = #x; break
SHOW_DEBUG_OF(MYSQL_TYPE_TINY);
@@ -588,7 +588,7 @@ static void Sql_P_ShowDebugMysqlFieldInfo(const char* prefix, enum enum_field_ty
SHOW_DEBUG_OF(MYSQL_TYPE_NULL);
#undef SHOW_DEBUG_TYPE_OF
}
ShowDebug("%stype=%s%s, length=%d%s\n", prefix, sign, type_string, length, length_postfix);
ShowDebug("%stype=%s%s, length=%lu%s\n", prefix, sign, type_string, length, length_postfix);
}


@@ -268,7 +268,7 @@ int add_timer_interval(t_tick tick, TimerFunc func, int id, intptr_t data, int i

if( interval < 1 )
{
ShowError("add_timer_interval: invalid interval (tick=%" PRtf " %p[%s] id=%d data=%d diff_tick=%d)\n", tick, func, search_timer_func_list(func), id, data, DIFF_TICK(tick, gettick()));
ShowError("add_timer_interval: invalid interval (tick=%" PRtf " %p[%s] id=%d data=%" PRIdPTR " diff_tick=%d)\n", tick, func, search_timer_func_list(func), id, data, DIFF_TICK(tick, gettick()));
return INVALID_TIMER;
}

@@ -70,14 +70,14 @@ void ShowDump(const void* buffer, size_t length)

if( (i%16) == 15 )
{
ShowDebug("%03X %s %s\n", i/16, hex, ascii);
ShowDebug("%03" PRIXPTR " %s %s\n", i/16, hex, ascii);
}
}

if( (i%16) != 0 )
{
ascii[i%16] = 0;
ShowDebug("%03X %-48s %-16s\n", i/16, hex, ascii);
ShowDebug("%03" PRIXPTR " %-48s %-16s\n", i/16, hex, ascii);
}
}

@@ -376,7 +376,7 @@ int logchrif_parse_reqbanacc(int fd, int id, char* ip){
uint8 buf[11];
char tmpstr[24];
timestamp2string(tmpstr, sizeof(tmpstr), timestamp, login_config.date_format);
ShowNotice("Char-server '%s': Ban request (account: %d, new final date of banishment: %d (%s), ip: %s).\n", ch_server[id].name, account_id, timestamp, tmpstr, ip);
ShowNotice("Char-server '%s': Ban request (account: %d, new final date of banishment: %s, ip: %s).\n", ch_server[id].name, account_id, tmpstr, ip);

acc.unban_time = timestamp;

@@ -12861,20 +12861,20 @@ TIMER_FUNC(status_change_timer){

bl = map_id2bl(id);
if(!bl) {
ShowDebug("status_change_timer: Null pointer id: %d data: %d\n", id, data);
ShowDebug("status_change_timer: Null pointer id: %d data: %" PRIdPTR "\n", id, data);
return 0;
}

struct status_change * const sc = status_get_sc(bl);
struct status_data * const status = status_get_status_data(bl);
if(!sc) {
ShowDebug("status_change_timer: Null pointer id: %d data: %d bl-type: %d\n", id, data, bl->type);
ShowDebug("status_change_timer: Null pointer id: %d data: %" PRIdPTR " bl-type: %d\n", id, data, bl->type);
return 0;
}

struct status_change_entry * const sce = sc->data[type];
if(!sce) {
ShowDebug("status_change_timer: Null pointer id: %d data: %d bl-type: %d\n", id, data, bl->type);
ShowDebug("status_change_timer: Null pointer id: %d data: %" PRIdPTR " bl-type: %d\n", id, data, bl->type);
return 0;
}
if( sce->timer != tid ) {

0 comments on commit bf27041

Please sign in to comment.
You can’t perform that action at this time.