TFTP
Change str_cat* functions to use size_t instead of int
This commit is contained in:
@@ -16,7 +16,7 @@ static tftp_custom_file_t virt_file[] =
|
||||
{.name = "virtImage.raw",.data = NULL, .len = 0, .ofset = 0}
|
||||
};
|
||||
|
||||
int str_cat_str(char* dest, int dest_size, const char* src) {
|
||||
int str_cat_str(char* dest, size_t dest_size, const char* src) {
|
||||
int dest_len = strlen(dest);
|
||||
int src_len = strlen(src);
|
||||
if (dest_len + src_len > dest_size) {
|
||||
@@ -26,7 +26,7 @@ int str_cat_str(char* dest, int dest_size, const char* src) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int str_cat(char* dest, int dest_size, char c)
|
||||
int str_cat(char* dest, size_t dest_size, char c)
|
||||
{
|
||||
int dest_len = strlen(dest);
|
||||
if (dest_len + 1 > dest_size) {
|
||||
|
||||
Reference in New Issue
Block a user