diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-06-18 20:03:57 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-06-18 20:11:16 -0700 |
commit | 83db3bbee4e19e7426a32ee89ad6c2d8e48260f2 (patch) | |
tree | a6fb6f6b6acaa09d5a43cd669f87c2f7f519a521 /src/char/int_storage.cpp | |
parent | 8b5370313dcc00a45ea5c3e8b4c497bc00fd8e13 (diff) | |
download | tmwa-83db3bbee4e19e7426a32ee89ad6c2d8e48260f2.tar.gz tmwa-83db3bbee4e19e7426a32ee89ad6c2d8e48260f2.tar.bz2 tmwa-83db3bbee4e19e7426a32ee89ad6c2d8e48260f2.tar.xz tmwa-83db3bbee4e19e7426a32ee89ad6c2d8e48260f2.zip |
Also poison memcpy, memmove, and memset
Diffstat (limited to 'src/char/int_storage.cpp')
-rw-r--r-- | src/char/int_storage.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/char/int_storage.cpp b/src/char/int_storage.cpp index ba55538..4067490 100644 --- a/src/char/int_storage.cpp +++ b/src/char/int_storage.cpp @@ -163,26 +163,24 @@ void inter_storage_delete(int account_id) // 倉庫データの送信 static -int mapif_load_storage(int fd, int account_id) +void mapif_load_storage(int fd, int account_id) { struct storage *s = account2storage(account_id); WFIFOW(fd, 0) = 0x3810; WFIFOW(fd, 2) = sizeof(struct storage) + 8; WFIFOL(fd, 4) = account_id; - memcpy(WFIFOP(fd, 8), s, sizeof(struct storage)); + WFIFO_STRUCT(fd, 8, *s); WFIFOSET(fd, WFIFOW(fd, 2)); - return 0; } // 倉庫データ保存完了送信 static -int mapif_save_storage_ack(int fd, int account_id) +void mapif_save_storage_ack(int fd, int account_id) { WFIFOW(fd, 0) = 0x3811; WFIFOL(fd, 2) = account_id; WFIFOB(fd, 6) = 0; WFIFOSET(fd, 7); - return 0; } //--------------------------------------------------------- @@ -190,15 +188,14 @@ int mapif_save_storage_ack(int fd, int account_id) // 倉庫データ要求受信 static -int mapif_parse_LoadStorage(int fd) +void mapif_parse_LoadStorage(int fd) { mapif_load_storage(fd, RFIFOL(fd, 2)); - return 0; } // 倉庫データ受信&保存 static -int mapif_parse_SaveStorage(int fd) +void mapif_parse_SaveStorage(int fd) { struct storage *s; int account_id = RFIFOL(fd, 4); @@ -211,10 +208,9 @@ int mapif_parse_SaveStorage(int fd) else { s = account2storage(account_id); - memcpy(s, RFIFOP(fd, 8), sizeof(struct storage)); + RFIFO_STRUCT(fd, 8, *s); mapif_save_storage_ack(fd, account_id); } - return 0; } // map server からの通信 |