Mercurial > mplayer.hg
comparison stream/http.c @ 30941:fb3bde3ec3a8
Change type to uint8_t to avoid checks depending on char signedness.
author | reimar |
---|---|
date | Fri, 02 Apr 2010 07:14:21 +0000 |
parents | 304b762b62cb |
children | 9494acd724a9 |
comparison
equal
deleted
inserted
replaced
30940:1bd408cc4143 | 30941:fb3bde3ec3a8 |
---|---|
123 unsigned metalen; | 123 unsigned metalen; |
124 my_read(fd, &tmp, 1, sc); | 124 my_read(fd, &tmp, 1, sc); |
125 metalen = tmp * 16; | 125 metalen = tmp * 16; |
126 if (metalen > 0) { | 126 if (metalen > 0) { |
127 int i; | 127 int i; |
128 char *info = malloc(metalen + 1); | 128 uint8_t *info = malloc(metalen + 1); |
129 unsigned nlen = my_read(fd, info, metalen, sc); | 129 unsigned nlen = my_read(fd, info, metalen, sc); |
130 // avoid breaking the user's terminal too much | 130 // avoid breaking the user's terminal too much |
131 if (nlen > 256) nlen = 256; | 131 if (nlen > 256) nlen = 256; |
132 for (i = 0; i < nlen; i++) | 132 for (i = 0; i < nlen; i++) |
133 if (info[i] && info[i] < 32) info[i] = '?'; | 133 if (info[i] && info[i] < 32) info[i] = '?'; |