]> gitweb.hhaalo.de Git - mv_none_space.git/commitdiff
reduce variable size
authorBastian Dehn <hhaalo@arcor.de>
Thu, 12 Mar 2026 19:17:29 +0000 (20:17 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Thu, 12 Mar 2026 19:17:29 +0000 (20:17 +0100)
src/rename.c

index a2e573cde9d340087534f7cd4ec0bcb23f44a73e..4eef654a7236f4588b34ec669e07582599592e02 100644 (file)
@@ -49,9 +49,9 @@ char* replace(char** src, const char* pattern, const char* replace_str)
                return NULL;
        memset(output, 0, output_length);
 
-       uint32_t in_pos = 0;
-       uint32_t out_pos = 0;
-       for (uint32_t i = 0; i < src_length; i++) {
+       uint16_t in_pos = 0;
+       uint16_t out_pos = 0;
+       for (uint16_t i = 0; i < src_length; i++) {
                if (strncmp(*src + i, pattern, pattern_length) == 0) {
                        memcpy(&output[out_pos], *src + in_pos, i - in_pos);
                        out_pos += i - in_pos;