summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2010-06-09 13:56:28 -0400
committerGaetan Nadon <memsize@videotron.ca>2010-06-09 21:18:09 -0400
commit0e3496a1551d3b0947f8fd20cd78275ab81278ed (patch)
tree217eca064cd4a553b43d28ac342660cd105e7c75
parentbc4ca2a54785b03ee771180d1142496f06f76adb (diff)
downloadxscope-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>
-rw-r--r--scope.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scope.c b/scope.c
index e33c9d9..758fd19 100644
--- a/scope.c
+++ b/scope.c
@@ -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;