Skip to content

Commit

Permalink
Change strncpyz define to strlcpy
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelortmann committed Jul 6, 2024
1 parent e23f8b7 commit df66050
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/mod/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ typedef void (*chanout_butfunc)(int, int, const char *, ...) ATTRIBUTE_FORMAT(pr
#define open_telnet ((int (*) (int, char *, int))global[87])
/* 88 - 91 */
#define check_tcl_event ((void (*) (const char *))global[88])
/* was my_memcpy -- use memcpy() instead */
/* was my_memcpy() -- use memcpy() instead */
#define my_atoul ((IP(*)(char *))global[90])
#define my_strcpy ((int (*)(char *, const char *))global[91])
/* 92 - 95 */
Expand Down Expand Up @@ -426,10 +426,10 @@ typedef void (*chanout_butfunc)(int, int, const char *, ...) ATTRIBUTE_FORMAT(pr
/* 252 - 255 */
#define egg_snprintf (global[252])
#define egg_vsnprintf ((int (*)(char *, size_t, const char *, va_list))global[253])
/* was egg_memset -- use memset() instead */
/* was egg_strcasecmp -- use strcasecmp instead */
/* was egg_memset() -- use memset() instead */
/* was egg_strcasecmp() -- use strcasecmp() instead */
/* 256 - 259 */
/* was egg_strncasecmp -- use strncasecmp instead */
/* was egg_strncasecmp() -- use strncasecmp() instead */
#define is_file ((int (*)(const char *))global[257])
#define must_be_owner (*(int *)(global[258]))
#define tandbot (*(tand_t **)(global[259]))
Expand Down Expand Up @@ -497,7 +497,7 @@ typedef void (*chanout_butfunc)(int, int, const char *, ...) ATTRIBUTE_FORMAT(pr
# define strlcpy ((size_t (*) (char *, const char *, size_t))global[303])
#endif
/* 304 - 307 */
#define strncpyz ((size_t (*) (char *, const char *, size_t))global[304])
#define strncpyz strlcpy /* strncpyz() is deprecated, use strlcpy() instead */
#ifndef HAVE_BASE64
# define b64_ntop ((int (*) (uint8_t const *, size_t, char *, size_t))global[305])
# define b64_pton ((int (*) (const char *, uint8_t *, size_t))global[306])
Expand Down
4 changes: 1 addition & 3 deletions src/modules.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@
# endif /* MOD_USE_DL */
#endif /* !STATIC */

#define strncpyz strlcpy

extern struct dcc_t *dcc;
extern struct userrec *userlist, *lastuser;
extern struct chanset_t *chanset;
Expand Down Expand Up @@ -591,7 +589,7 @@ Function global_table[] = {
(Function) 0,
#endif
/* 304 - 307 */
(Function) strncpyz,
(Function) strlcpy, /* was strncpyz() -- use strlcpy() instead */
#ifndef HAVE_BASE64
(Function) b64_ntop,
(Function) b64_pton,
Expand Down

0 comments on commit df66050

Please sign in to comment.