home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use not f_name variable but __func__, standardize function name writing.
[plomrogue]
/
src
/
server
/
things.c
diff --git
a/src/server/things.c
b/src/server/things.c
index 6df9b18efe5fe32ab5bd441ac6e2232032540fcf..2cb7db9bfb00de61c70e1f7fd214db978e232f58 100644
(file)
--- a/
src/server/things.c
+++ b/
src/server/things.c
@@
-66,8
+66,7
@@
static struct NextAndId * add_to_struct_list(size_t n_size, uint8_t start_id,
int16_t id, uint8_t struct_id,
struct NextAndId ** start)
{
int16_t id, uint8_t struct_id,
struct NextAndId ** start)
{
- char * f_name = "add_to_struct_list()";
- struct NextAndId * nai = try_malloc(n_size, f_name);
+ struct NextAndId * nai = try_malloc(n_size, __func__);
memset(nai, 0, n_size);
nai->id = (start_id<=id && id<=UINT8_MAX) ? id : get_unused_id(struct_id);
struct NextAndId ** nai_ptr_ptr = start;
memset(nai, 0, n_size);
nai->id = (start_id<=id && id<=UINT8_MAX) ? id : get_unused_id(struct_id);
struct NextAndId ** nai_ptr_ptr = start;
@@
-112,7
+111,7
@@
extern struct Thing * add_thing(int16_t id, uint8_t type, uint8_t y, uint8_t x)
{
struct Thing * t;
t = (struct Thing *) add_to_struct_list(sizeof(struct Thing), 0, id, 0,
{
struct Thing * t;
t = (struct Thing *) add_to_struct_list(sizeof(struct Thing), 0, id, 0,
- (struct NextAndId **)
&world.things);
+ (struct NextAndId **)&world.things);
struct ThingType * tt = get_thing_type(type);
set_cleanup_flag(CLEANUP_THINGS);
t->type = tt->id;
struct ThingType * tt = get_thing_type(type);
set_cleanup_flag(CLEANUP_THINGS);
t->type = tt->id;