diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/chrif.c | 4 | ||||
-rw-r--r-- | src/map/clif.c | 6 | ||||
-rw-r--r-- | src/map/map.c | 14 | ||||
-rw-r--r-- | src/map/npc.c | 10 | ||||
-rw-r--r-- | src/map/party.c | 2 | ||||
-rw-r--r-- | src/map/path.c | 2 | ||||
-rw-r--r-- | src/map/pc.c | 2 |
7 files changed, 20 insertions, 20 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c index 7c24ea25d..ccf92a6cf 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -343,7 +343,7 @@ int chrif_connectack(int fd) { if (RFIFOB(fd,2)) { ShowFatalError("Connection to char-server failed %d.\n", RFIFOB(fd,2)); - exit(1); + exit(EXIT_FAILURE); } ShowStatus("Successfully logged on to Char Server (Connection: '"CL_WHITE"%d"CL_RESET"').\n",fd); chrif_state = 1; @@ -368,7 +368,7 @@ int chrif_sendmapack(int fd) { if (RFIFOB(fd,2)) { ShowFatalError("chrif : send map list to char server failed %d\n", RFIFOB(fd,2)); - exit(1); + exit(EXIT_FAILURE); } memcpy(wisp_server_name, RFIFOP(fd,3), NAME_LENGTH); diff --git a/src/map/clif.c b/src/map/clif.c index 02bfe2e95..58db07b2a 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -11776,7 +11776,7 @@ static int packetdb_readdb(void) sprintf(line, "%s/packet_db.txt", db_path); if( (fp=fopen(line,"r"))==NULL ){ ShowFatalError("can't read %s\n", line); - exit(1); + exit(EXIT_FAILURE); } clif_config.packet_db_ver = MAX_PACKET_VER; @@ -11886,7 +11886,7 @@ static int packetdb_readdb(void) if(str[3]==NULL){ ShowError("packet_db: packet error\n"); - exit(1); + exit(EXIT_FAILURE); } for(j=0,p2=str[3];p2;j++){ str2[j]=p2; @@ -11928,7 +11928,7 @@ int do_init_clif(void) set_defaultparse(clif_parse); if (!make_listen_bind(bind_ip,map_port)) { ShowFatalError("can't bind game port\n"); - exit(1); + exit(EXIT_FAILURE); } add_timer_func_list(clif_waitclose, "clif_waitclose"); diff --git a/src/map/map.c b/src/map/map.c index 2b9e94b23..0325ff839 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2394,7 +2394,7 @@ int map_setipport(unsigned short mapindex, uint32 ip, uint16 port) if(ip == clif_getip() && port == clif_getport()) { //That's odd, we received info that we are the ones with this map, but... we don't have it. ShowFatalError("map_setipport : received info that this map-server SHOULD have map '%s', but it is not loaded.\n",mapindex_id2name(mapindex)); - exit(1); + exit(EXIT_FAILURE); } mdos->ip = ip; mdos->port = port; @@ -2606,7 +2606,7 @@ int map_readallmaps (void) if( (fp = fopen(map_cache_file, "rb")) == NULL ) { ShowFatalError("Unable to open map cache file "CL_WHITE"%s"CL_RESET"\n", map_cache_file); - exit(1); //No use launching server if maps can't be read. + exit(EXIT_FAILURE); //No use launching server if maps can't be read. } } @@ -2961,7 +2961,7 @@ int map_sql_init(void) ShowInfo("Connecting to the Map DB Server....\n"); if( SQL_ERROR == Sql_Connect(mmysql_handle, map_server_id, map_server_pw, map_server_ip, map_server_port, map_server_db) ) - exit(1); + exit(EXIT_FAILURE); ShowStatus("connect success! (Map Server Connection)\n"); if( strlen(default_codepage) > 0 ) @@ -2975,7 +2975,7 @@ int map_sql_init(void) ShowInfo("Connecting to the Mail DB Server....\n"); if( SQL_ERROR == Sql_Connect(mail_handle, mail_server_id, mail_server_pw, mail_server_ip, mail_server_port, mail_server_db) ) - exit(1); + exit(EXIT_FAILURE); if( strlen(default_codepage) > 0 ) if ( SQL_ERROR == Sql_SetEncoding(mail_handle, default_codepage) ) @@ -3015,7 +3015,7 @@ int log_sql_init(void) ShowInfo(""CL_WHITE"[SQL]"CL_RESET": Connecting to the Log Database "CL_WHITE"%s"CL_RESET" At "CL_WHITE"%s"CL_RESET"...\n",log_db,log_db_ip); if ( SQL_ERROR == Sql_Connect(logmysql_handle, log_db_id, log_db_pw, log_db_ip, log_db_port, log_db) ) - exit(1); + exit(EXIT_FAILURE); ShowStatus(""CL_WHITE"[SQL]"CL_RESET": Successfully '"CL_GREEN"connected"CL_RESET"' to Database '"CL_WHITE"%s"CL_RESET"'.\n", log_db); if( strlen(default_codepage) > 0 ) @@ -3269,7 +3269,7 @@ void map_helpscreen(int flag) puts(" (SQL Only)"); puts(" --version, --v, -v, /v Displays the server's version"); puts("\n"); - if (flag) exit(1); + if (flag) exit(EXIT_FAILURE); } /*====================================================== @@ -3285,7 +3285,7 @@ void map_versionscreen(int flag) puts(CL_GREEN "IRC Channel:" CL_RESET "\tirc://irc.deltaanime.net/#athena"); puts("\nOpen " CL_WHITE "readme.html" CL_RESET " for more information."); if (ATHENA_RELEASE_FLAG) ShowNotice("This version is not for release.\n"); - if (flag) exit(1); + if (flag) exit(EXIT_FAILURE); } /*====================================================== diff --git a/src/map/npc.c b/src/map/npc.c index 177612b50..35515e33c 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -201,10 +201,10 @@ int npc_event_export(char* lname, void* data, va_list ap) ev = (struct event_data *) aMalloc(sizeof(struct event_data)); if (ev==NULL) { ShowFatalError("npc_event_export: out of memory !\n"); - exit(1); + exit(EXIT_FAILURE); }else if (p==NULL || (p-lname)>NAME_LENGTH) { ShowFatalError("npc_event_export: label name error !\n"); - exit(1); + exit(EXIT_FAILURE); }else{ ev->nd = nd; ev->pos = pos; @@ -371,7 +371,7 @@ int npc_timerevent_import(char* lname, void* data, va_list ap) else te= (struct npc_timerevent_list*)aRealloc( te, sizeof(struct npc_timerevent_list) * (i+1) ); if(te==NULL){ ShowFatalError("npc_timerevent_import: out of memory !\n"); - exit(1); + exit(EXIT_FAILURE); } for(j=0;j<i;j++){ if(te[j].timer>t){ @@ -1604,7 +1604,7 @@ int npc_convertlabel_db(DBKey key, void* data, va_list ap) // here we check if the label fit into the buffer if (len > 23) { ShowError("npc_parse_script: label name longer than 23 chars! '%s'\n (%s)", lname, current_file); - exit(1); + exit(EXIT_FAILURE); } safestrncpy(lst[num].name, lname, NAME_LENGTH); lst[num].pos = pos; @@ -1658,7 +1658,7 @@ static void npc_parse_script_line(char* p, int* curly_count, int line) } if(string_flag) { printf("Missing '\"' at file %s line %d\n", current_file, line); - exit(1); + exit(EXIT_FAILURE); } } diff --git a/src/map/party.c b/src/map/party.c index 90689a612..68a209172 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -121,7 +121,7 @@ int party_created(int account_id,int char_id,int fail,int party_id,char *name) sd->status.party_id=party_id; if(idb_get(party_db,party_id)!=NULL){ ShowFatalError("party: id already exists!\n"); - exit(1); + exit(EXIT_FAILURE); } p=(struct party_data *)aCalloc(1,sizeof(struct party_data)); p->party.party_id=party_id; diff --git a/src/map/path.c b/src/map/path.c index 9f173fc54..48b62755a 100644 --- a/src/map/path.c +++ b/src/map/path.c @@ -59,7 +59,7 @@ static void update_heap_path(int *heap,struct tmp_path *tp,int index) if( h == heap[0] ) { ShowError("update_heap_path bug\n"); - exit(1); + exit(EXIT_FAILURE); } for( i = (h-1)/2; h > 0 && tp[index].cost < tp[heap[i+1]].cost; i = (h-1)/2 ) diff --git a/src/map/pc.c b/src/map/pc.c index 690477d10..99cde53d5 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5946,7 +5946,7 @@ int pc_setregstr(struct map_session_data *sd,int reg,char *str) sd->regstr = (struct script_regstr *) aRealloc(sd->regstr, sizeof(sd->regstr[0]) * sd->regstr_num); if(sd->regstr==NULL){ ShowFatalError("out of memory : pc_setreg\n"); - exit(1); + exit(EXIT_FAILURE); } memset(sd->regstr + (sd->regstr_num - 1), 0, sizeof(struct script_regstr)); sd->regstr[i].index = reg; |