diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-17 17:20:01 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-17 17:20:01 +0000 |
commit | a4c3bb6153b6fd1a8d54abde6f7d9ecd593a4e4d (patch) | |
tree | 75dde2edb2807cb44b6ea17cd2f405ad66399716 /src/map/npc.c | |
parent | 8982c119eaaa031bbdd70798a077c14b5bc183c1 (diff) | |
download | hercules-a4c3bb6153b6fd1a8d54abde6f7d9ecd593a4e4d.tar.gz hercules-a4c3bb6153b6fd1a8d54abde6f7d9ecd593a4e4d.tar.bz2 hercules-a4c3bb6153b6fd1a8d54abde6f7d9ecd593a4e4d.tar.xz hercules-a4c3bb6153b6fd1a8d54abde6f7d9ecd593a4e4d.zip |
Using predefined constants as parameters to the exit() function.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11501 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 10 |
1 files changed, 5 insertions, 5 deletions
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); } } |