diff options
author | Pete Batard <pete@akeo.ie> | 2012-05-07 15:41:50 +0100 |
---|---|---|
committer | Pete Batard <pete@akeo.ie> | 2012-05-08 11:01:42 +0100 |
commit | 00d6fed8f26418b00ab9177d67d53af7328ec127 (patch) | |
tree | c0e34293c8fa5d4155cf935d09c7ebe7e12b7229 /examples | |
parent | d190bd7887ba7aba5949704592d5a18680e8a2df (diff) | |
download | libusb-00d6fed8f26418b00ab9177d67d53af7328ec127.tar.gz |
Samples: fix strcat vs strlcat warning on OpenBSD
* Without this, OpenBSD produces the following warning:
strcat() is almost always misused, please use strlcat()
Diffstat (limited to 'examples')
-rw-r--r-- | examples/xusb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/xusb.c b/examples/xusb.c index a98ebb4..c811353 100644 --- a/examples/xusb.c +++ b/examples/xusb.c @@ -54,7 +54,7 @@ // Global variables bool binary_dump = false; -char binary_name[64]; +char binary_name[64] = "raw.bin"; static int perr(char const *format, ...) { @@ -778,7 +778,6 @@ int main(int argc, char** argv) debug_mode = true; break; case 'b': - strcat(binary_name, "raw.bin"); if (j+1 < argc) { strncpy(binary_name, argv[j+1], 64); j++; |