Skip to content

Commit

Permalink
Few typo
Browse files Browse the repository at this point in the history
Fix few typo and change défault optimisation lvl for O3 for gcc.
  • Loading branch information
lighta committed Dec 20, 2014
1 parent 5a80fb1 commit a075324
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 37 deletions.
17 changes: 8 additions & 9 deletions configure
Expand Up @@ -2860,13 +2860,13 @@ if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
CFLAGS="-O3"
else
CFLAGS="-g"
CFLAGS=
fi
else
if test "$GCC" = yes; then
CFLAGS="-O2"
CFLAGS="-O3"
else
CFLAGS=
fi
Expand Down Expand Up @@ -6297,10 +6297,6 @@ fi
# Debug
#
case $enable_debug in
"no")
# default value
CPPFLAGS="$CPPFLAGS"
;;
"yes")
if test $ac_cv_prog_cc_g = yes; then
CPPFLAGS="$CPPFLAGS -g -DDEBUG"
Expand All @@ -6313,12 +6309,15 @@ case $enable_debug in
"gdb")
if test $ac_cv_prog_cc_g = yes; then
CPPFLAGS="$CPPFLAGS -ggdb -DDEBUG"
LDFLAGS="$LDFLAGS -g"
LDFLAGS="$LDFLAGS -ggdb"
else
echo "error: --enable-debug flag=$enable_debug entered but the compiler does not support -g"
exit 1
fi
;;
*) # default value
CPPFLAGS="$CPPFLAGS"
;;
esac
#
Expand Down Expand Up @@ -7379,8 +7378,8 @@ else
$as_echo "no" >&6; }
fi
CFLAGS="$OPT_LTO $CFLAGS"
CFLAGS_AR="$OPT_LTO_AR $CFLAGS"
CFLAGS="$OPT_LTO $CFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Configure finish" >&5
Expand Down
11 changes: 5 additions & 6 deletions configure.in
Expand Up @@ -962,10 +962,6 @@ fi
# Debug
#
case $enable_debug in
"no")
# default value
CPPFLAGS="$CPPFLAGS"
;;
"yes")
if test $ac_cv_prog_cc_g = yes; then
CPPFLAGS="$CPPFLAGS -g -DDEBUG"
Expand All @@ -978,12 +974,15 @@ case $enable_debug in
"gdb")
if test $ac_cv_prog_cc_g = yes; then
CPPFLAGS="$CPPFLAGS -ggdb -DDEBUG"
LDFLAGS="$LDFLAGS -g"
LDFLAGS="$LDFLAGS -ggdb"
else
echo "error: --enable-debug flag=$enable_debug entered but the compiler does not support -g"
exit 1
fi
;;
*) # default value
CPPFLAGS="$CPPFLAGS"
;;
esac

#
Expand Down Expand Up @@ -1261,8 +1260,8 @@ else
AC_MSG_RESULT([no])
fi

CFLAGS="$OPT_LTO $CFLAGS"
CFLAGS_AR="$OPT_LTO_AR $CFLAGS"
CFLAGS="$OPT_LTO $CFLAGS"
AC_SUBST([CFLAGS_AR])

AC_MSG_NOTICE([Configure finish])
Expand Down
14 changes: 0 additions & 14 deletions src/common/evdp_epoll.c
Expand Up @@ -8,20 +8,6 @@
//
//

#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>

#include <sys/epoll.h>
#include <sys/fcntl.h>
#include <sys/socket.h>

#include "../common/cbasetypes.h"
#include "../common/showmsg.h"
#include "../common/evdp.h"


#define EPOLL_MAX_PER_CYCLE 10 // Max Events to coalesc. per cycle.

Expand Down
2 changes: 1 addition & 1 deletion src/login/loginclif.c
Expand Up @@ -430,7 +430,7 @@ static int logclif_parse_reqcharconnec(int fd, struct login_session_data *sd, ch
if( runflag == LOGINSERVER_ST_RUNNING &&
result == -1 &&
sd->sex == 'S' &&
sd->account_id >= 0 && sd->account_id < ARRAYLENGTH(ch_server) &&
sd->account_id < ARRAYLENGTH(ch_server) &&
!session_isValid(ch_server[sd->account_id].fd) )
{
ShowStatus("Connection of the char-server '%s' accepted.\n", server_name);
Expand Down
13 changes: 7 additions & 6 deletions src/map/chrif.c
Expand Up @@ -1030,20 +1030,21 @@ int chrif_divorceack(uint32 char_id, int partner_id) {
*------------------------------------------*/
int chrif_deadopt(int father_id, int mother_id, int child_id) {
struct map_session_data* sd;
int idx = skill_get_index(WE_CALLBABY);

if( father_id && ( sd = map_charid2sd(father_id) ) != NULL && sd->status.child == child_id ) {
sd->status.child = 0;
sd->status.skill[WE_CALLBABY].id = 0;
sd->status.skill[WE_CALLBABY].lv = 0;
sd->status.skill[WE_CALLBABY].flag = SKILL_FLAG_PERMANENT;
sd->status.skill[idx].id = 0;
sd->status.skill[idx].lv = 0;
sd->status.skill[idx].flag = SKILL_FLAG_PERMANENT;
clif_deleteskill(sd,WE_CALLBABY);
}

if( mother_id && ( sd = map_charid2sd(mother_id) ) != NULL && sd->status.child == child_id ) {
sd->status.child = 0;
sd->status.skill[WE_CALLBABY].id = 0;
sd->status.skill[WE_CALLBABY].lv = 0;
sd->status.skill[WE_CALLBABY].flag = SKILL_FLAG_PERMANENT;
sd->status.skill[idx].id = 0;
sd->status.skill[idx].lv = 0;
sd->status.skill[idx].flag = SKILL_FLAG_PERMANENT;
clif_deleteskill(sd,WE_CALLBABY);
}

Expand Down
2 changes: 1 addition & 1 deletion src/map/script.c
Expand Up @@ -10687,7 +10687,7 @@ BUILDIN_FUNC(morphembryo)
item_tmp.nameid = ITEMID_STRANGE_EMBRYO;
item_tmp.identify = 1;

if( item_tmp.nameid == 0 || (i = pc_additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT)) ) {
if( (i = pc_additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT)) ) {
clif_additem(sd, 0, 0, i);
clif_emotion(&sd->bl, E_SWT); // Fail to avoid item drop exploit.
} else {
Expand Down

0 comments on commit a075324

Please sign in to comment.