diff options
author | Christian Heimes <christian@cheimes.de> | 2013-07-20 12:11:28 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-07-20 12:11:28 (GMT) |
commit | e91ad501c55184f375518f058b6e0625d47de0b1 (patch) | |
tree | d67e80ef470ae92cecce83b70af8ba69acfb9e00 /Modules/ossaudiodev.c | |
parent | 5ea0f80165109e7a144e6e3780a17dcd63dfae47 (diff) | |
download | cpython-e91ad501c55184f375518f058b6e0625d47de0b1.zip cpython-e91ad501c55184f375518f058b6e0625d47de0b1.tar.gz cpython-e91ad501c55184f375518f058b6e0625d47de0b1.tar.bz2 |
Use strncat() instead of strcat() to silence some warnings.
CID 486616, CID 486617, CID 486615
Diffstat (limited to 'Modules/ossaudiodev.c')
-rw-r--r-- | Modules/ossaudiodev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/ossaudiodev.c b/Modules/ossaudiodev.c index 50e266f..5e45abd 100644 --- a/Modules/ossaudiodev.c +++ b/Modules/ossaudiodev.c @@ -245,7 +245,7 @@ _do_ioctl_1(int fd, PyObject *args, char *fname, int cmd) int arg; assert(strlen(fname) <= 30); - strcat(argfmt, fname); + strncat(argfmt, fname, 30); if (!PyArg_ParseTuple(args, argfmt, &arg)) return NULL; @@ -270,7 +270,7 @@ _do_ioctl_1_internal(int fd, PyObject *args, char *fname, int cmd) int arg = 0; assert(strlen(fname) <= 30); - strcat(argfmt, fname); + strncat(argfmt, fname, 30); if (!PyArg_ParseTuple(args, argfmt, &arg)) return NULL; @@ -290,7 +290,7 @@ _do_ioctl_0(int fd, PyObject *args, char *fname, int cmd) int rv; assert(strlen(fname) <= 30); - strcat(argfmt, fname); + strncat(argfmt, fname, 30); if (!PyArg_ParseTuple(args, argfmt)) return NULL; |