mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Added 'const' to please compiler
This commit is contained in:
parent
c328647560
commit
88f13b1b29
4
menu.c
4
menu.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'osm.c' for copyright information and
|
* See the main source file 'osm.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: menu.c 1.4 2000/04/16 15:45:44 kls Exp $
|
* $Id: menu.c 1.5 2000/04/22 15:21:08 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@ -428,7 +428,7 @@ void cMenuEditStrItem::Set(void)
|
|||||||
char buf[1000];
|
char buf[1000];
|
||||||
if (pos >= 0) {
|
if (pos >= 0) {
|
||||||
strncpy(buf, value, pos);
|
strncpy(buf, value, pos);
|
||||||
char *s = value[pos] != ' ' ? value + pos + 1 : "";
|
const char *s = value[pos] != ' ' ? value + pos + 1 : "";
|
||||||
snprintf(buf + pos, sizeof(buf) - pos - 2, "[%c]%s", *(value + pos), s);
|
snprintf(buf + pos, sizeof(buf) - pos - 2, "[%c]%s", *(value + pos), s);
|
||||||
SetValue(buf);
|
SetValue(buf);
|
||||||
}
|
}
|
||||||
|
6
remote.c
6
remote.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'osm.c' for copyright information and
|
* See the main source file 'osm.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: remote.c 1.3 2000/04/16 13:54:16 kls Exp $
|
* $Id: remote.c 1.4 2000/04/22 15:21:41 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "remote.h"
|
#include "remote.h"
|
||||||
@ -211,12 +211,12 @@ bool cRcIo::Number(int n, bool Hex)
|
|||||||
|
|
||||||
bool cRcIo::String(char *s)
|
bool cRcIo::String(char *s)
|
||||||
{
|
{
|
||||||
char *chars = mode == modeH ? "0123456789ABCDEF" : "0123456789-EHLP ";
|
const char *chars = mode == modeH ? "0123456789ABCDEF" : "0123456789-EHLP ";
|
||||||
int n = 0;
|
int n = 0;
|
||||||
|
|
||||||
for (int i = 0; *s && i < 4; s++, i++) {
|
for (int i = 0; *s && i < 4; s++, i++) {
|
||||||
n <<= 4;
|
n <<= 4;
|
||||||
for (char *c = chars; *c; c++) {
|
for (const char *c = chars; *c; c++) {
|
||||||
if (*c == *s) {
|
if (*c == *s) {
|
||||||
n |= c - chars;
|
n |= c - chars;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user