comparison target-utils/libtiffs/rdinmem.c @ 99:9214118ae941

target-utils: use of bcopy() changed to memcpy()
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 01 Nov 2016 00:05:31 +0000
parents 87cb03b35f77
children
comparison
equal deleted inserted replaced
98:5aff772ff84d 99:9214118ae941
19 if (chunk_size > maxlen) { 19 if (chunk_size > maxlen) {
20 toobig: printf("Error: %s is bigger than the read buffer\n", pathname); 20 toobig: printf("Error: %s is bigger than the read buffer\n", pathname);
21 return(-1); 21 return(-1);
22 } 22 }
23 real_len = chunk_size; 23 real_len = chunk_size;
24 bcopy(chunk_start, buf, chunk_size); 24 memcpy(buf, chunk_start, chunk_size);
25 buf += chunk_size; 25 buf += chunk_size;
26 roomleft = maxlen - chunk_size; 26 roomleft = maxlen - chunk_size;
27 while (cont) { 27 while (cont) {
28 stat = tiffs_get_segment(cont, &chunk_start, &chunk_size, 28 stat = tiffs_get_segment(cont, &chunk_start, &chunk_size,
29 &cont); 29 &cont);
30 if (stat < 0) 30 if (stat < 0)
31 return(stat); 31 return(stat);
32 if (chunk_size > roomleft) 32 if (chunk_size > roomleft)
33 goto toobig; 33 goto toobig;
34 real_len += chunk_size; 34 real_len += chunk_size;
35 bcopy(chunk_start, buf, chunk_size); 35 memcpy(buf, chunk_start, chunk_size);
36 buf += chunk_size; 36 buf += chunk_size;
37 roomleft -= chunk_size; 37 roomleft -= chunk_size;
38 } 38 }
39 if (lenrtn) 39 if (lenrtn)
40 *lenrtn = real_len; 40 *lenrtn = real_len;