summaryrefslogtreecommitdiff
path: root/src/core/misc.c
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2016-02-13 13:18:24 +0100
committerLemonBoy <thatlemon@gmail.com>2016-06-05 16:24:55 +0200
commit72712a0c62b0403f0fa472ccbe34fda8fb2cd530 (patch)
tree54b053fa85d0630ff04f5f8e65843fe14a85e00a /src/core/misc.c
parent8289f360757870b56a15576a20e79e1f2ca30fef (diff)
downloadirssi-72712a0c62b0403f0fa472ccbe34fda8fb2cd530.zip
Replace strocpy with g_strlcpy
The only difference was that the former returned 1 if the buffer was overflown, but the return value was never checked.
Diffstat (limited to 'src/core/misc.c')
-rw-r--r--src/core/misc.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/core/misc.c b/src/core/misc.c
index a8a0975a..682d006c 100644
--- a/src/core/misc.c
+++ b/src/core/misc.c
@@ -773,20 +773,6 @@ char *escape_string(const char *str)
return ret;
}
-int strocpy(char *dest, const char *src, size_t dstsize)
-{
- if (dstsize == 0)
- return -1;
-
- while (*src != '\0' && dstsize > 1) {
- *dest++ = *src++;
- dstsize--;
- }
-
- *dest++ = '\0';
- return *src == '\0' ? 0 : -1;
-}
-
int nearest_power(int num)
{
int n = 1;