mirror of https://github.com/Genymobile/scrcpy
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
137d2c9791
This util function was error-prone: - it accepted a buffer as parameter (not necessarily a NUL-terminated string) and its length (including the NUL char, if any); - it wrote '\0' over the last character of the buffer, so the last character was lost if the buffer was not a NUL-terminated string, and even worse, it caused undefined behavior if the length was empty; - it returned the length of the resulting NUL-terminated string, which was inconsistent with the input buffer length. In addition, it was not necessarily optimal: - it wrote '\0' twice; - it required to know the buffer length, that is the input string length + 1, in advance. Remove this function, and let the client use strcspn() manually. |
3 years ago | |
---|---|---|
.. | ||
test_adb_parser.c | 3 years ago | |
test_buffer_util.c | 4 years ago | |
test_cbuf.c | 4 years ago | |
test_cli.c | 3 years ago | |
test_clock.c | 3 years ago | |
test_control_msg_serialize.c | 3 years ago | |
test_device_msg_deserialize.c | 3 years ago | |
test_queue.c | 3 years ago | |
test_str.c | 3 years ago | |
test_strbuf.c | 3 years ago |