diff options
author | Alban Crequy <alban.crequy@collabora.co.uk> | 2008-11-06 17:50:40 +0000 |
---|---|---|
committer | Alban Crequy <alban.crequy@collabora.co.uk> | 2008-11-06 17:54:24 +0000 |
commit | 70ae190d576dbbf2a791791bbe19c8d40f416ad2 (patch) | |
tree | f4832a83751b34fc1cfc84715e10774f41461f36 /lib/gibber/gibber-unix-transport.c | |
parent | 23bb87b1797976846b56867cb6e126d1736f5d45 (diff) | |
download | telepathy-salut-70ae190d576dbbf2a791791bbe19c8d40f416ad2.tar.gz |
Use g_strlcpy instead of strncpy + []='\0'
Diffstat (limited to 'lib/gibber/gibber-unix-transport.c')
-rw-r--r-- | lib/gibber/gibber-unix-transport.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/gibber/gibber-unix-transport.c b/lib/gibber/gibber-unix-transport.c index 68128933..b1a66416 100644 --- a/lib/gibber/gibber-unix-transport.c +++ b/lib/gibber/gibber-unix-transport.c @@ -139,8 +139,7 @@ gibber_unix_transport_connect (GibberUnixTransport *transport, } addr.un.sun_family = PF_UNIX; - strncpy (addr.un.sun_path, path, sizeof (addr.un.sun_path) - 1); - addr.un.sun_path[sizeof (addr.un.sun_path) - 1] = '\0'; + g_strlcpy (addr.un.sun_path, path, sizeof (addr.un.sun_path)); if (connect (fd, &addr.addr, sizeof (addr.un)) == -1) { |