diff options
author | Gaetan Nadon <memsize@videotron.ca> | 2010-06-09 13:56:28 -0400 |
---|---|---|
committer | Gaetan Nadon <memsize@videotron.ca> | 2010-06-09 21:18:09 -0400 |
commit | 0e3496a1551d3b0947f8fd20cd78275ab81278ed (patch) | |
tree | 217eca064cd4a553b43d28ac342660cd105e7c75 /scope.c | |
parent | bc4ca2a54785b03ee771180d1142496f06f76adb (diff) | |
download | xscope-0e3496a1551d3b0947f8fd20cd78275ab81278ed.tar.gz |
Use strncpy rather than strlcpy as it is not available on Linux
Because it is available on other platforms, it only fails on Linux.
strncpy should be safe enough in this situation where a constant is copied.
The xserver private impl of strlcpy is not available to apps.
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -337,7 +337,7 @@ ReadCommands (void) printf ("> "); if (!fgets (line, sizeof line, stdin)) { if(feof(stdin)) { - strlcpy(line, "quit", sizeof(line)); + strncpy(line, "quit", sizeof(line)); } else { printf("Error: %s\n", strerror(errno)); break; |