mirror of
git://git.psyced.org/git/psyclpc
synced 2024-08-15 03:20:16 +00:00
less warnings for me
This commit is contained in:
parent
62763ffeba
commit
a17a76ecbe
2 changed files with 28 additions and 26 deletions
|
@ -17,35 +17,37 @@
|
||||||
# include "xalloc.h"
|
# include "xalloc.h"
|
||||||
|
|
||||||
typedef struct psyc_state_s {
|
typedef struct psyc_state_s {
|
||||||
psycParseState *parser;
|
psycParseState *parser;
|
||||||
vector_t *packet;
|
vector_t *packet;
|
||||||
// tmp storage for incomplete modifier/body
|
// tmp storage for incomplete modifier/body
|
||||||
char oper;
|
char oper;
|
||||||
char *name;
|
char *name;
|
||||||
size_t name_len;
|
size_t name_len;
|
||||||
char *value;
|
char *value;
|
||||||
size_t value_len;
|
size_t value_len;
|
||||||
// tmp storage for remaining unparsed bytes at the end of the buffer
|
// tmp storage for remaining unparsed bytes at the end of the buffer
|
||||||
char *remaining;
|
char *remaining;
|
||||||
size_t remaining_len;
|
size_t remaining_len;
|
||||||
} psyc_state_t;
|
} psyc_state_t;
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
psyc_free_state (psyc_state_t *ps) {
|
psyc_free_state (psyc_state_t *ps) {
|
||||||
if (!ps)
|
if (!ps)
|
||||||
return;
|
return;
|
||||||
if (ps->name)
|
if (ps->name)
|
||||||
pfree((void *) ps->name);
|
pfree((void *) ps->name);
|
||||||
if (ps->value)
|
if (ps->value)
|
||||||
pfree((void *) ps->value);
|
pfree((void *) ps->value);
|
||||||
if (ps->remaining)
|
if (ps->remaining)
|
||||||
pfree((void *) ps->remaining);
|
pfree((void *) ps->remaining);
|
||||||
if (ps->parser)
|
if (ps->parser)
|
||||||
pfree((void *) ps->parser);
|
pfree((void *) ps->parser);
|
||||||
if (ps->packet)
|
if (ps->packet)
|
||||||
free_array(ps->packet);
|
free_array(ps->packet);
|
||||||
ps->name = ps->value = ps->remaining = ps->parser = ps->packet = NULL;
|
ps->name = ps->value = ps->remaining = NULL;
|
||||||
ps->oper = ps->name_len = ps->value_len = ps->remaining_len = 0;
|
ps->parser = NULL;
|
||||||
|
ps->packet = NULL;
|
||||||
|
ps->oper = ps->name_len = ps->value_len = ps->remaining_len = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
# define PKG_PSYC_H
|
# define PKG_PSYC_H
|
||||||
|
|
|
@ -17,7 +17,7 @@ version_longtype="stable"
|
||||||
# A timestamp, to be used by bumpversion and other scripts.
|
# A timestamp, to be used by bumpversion and other scripts.
|
||||||
# It can be used, for example, to 'touch' this file on every build, thus
|
# It can be used, for example, to 'touch' this file on every build, thus
|
||||||
# forcing revision control systems to add it on every checkin automatically.
|
# forcing revision control systems to add it on every checkin automatically.
|
||||||
version_stamp="Tue May 10 01:00:33 CEST 2011"
|
version_stamp="Tue May 10 14:07:26 CEST 2011"
|
||||||
|
|
||||||
# Okay, LDMUD is using 3.x.x so to avoid conflicts let's just use 4.x.x
|
# Okay, LDMUD is using 3.x.x so to avoid conflicts let's just use 4.x.x
|
||||||
version_major=4
|
version_major=4
|
||||||
|
|
Loading…
Reference in a new issue