Fix constness problems.
This commit is contained in:
parent
5d970109c8
commit
0191c11595
3 changed files with 7 additions and 7 deletions
|
@ -28,14 +28,14 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* @(#)$Id: symbols.h,v 1.1 2006/06/17 22:41:18 adamdunkels Exp $
|
* @(#)$Id: symbols.h,v 1.2 2006/12/01 15:05:20 bg- Exp $
|
||||||
*/
|
*/
|
||||||
#ifndef __SYMBOLS_H__
|
#ifndef __SYMBOLS_H__
|
||||||
#define __SYMBOLS_H__
|
#define __SYMBOLS_H__
|
||||||
|
|
||||||
struct symbols {
|
struct symbols {
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *value;
|
void *value;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const struct symbols symbols[];
|
extern const struct symbols symbols[];
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* @(#)$Id: symtab.c,v 1.1 2006/06/17 22:41:18 adamdunkels Exp $
|
* @(#)$Id: symtab.c,v 1.2 2006/12/01 15:05:21 bg- Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
|
@ -38,11 +38,11 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
const char *
|
void *
|
||||||
symtab_lookup(const char *name)
|
symtab_lookup(const char *name)
|
||||||
{
|
{
|
||||||
const struct symbols *s;
|
const struct symbols *s;
|
||||||
for(s = symbols; s->name != (const void *)0; ++s) {
|
for(s = symbols; s->name != NULL; ++s) {
|
||||||
if(strcmp(name, s->name) == 0) {
|
if(strcmp(name, s->name) == 0) {
|
||||||
return s->value;
|
return s->value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,11 +28,11 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* @(#)$Id: symtab.h,v 1.1 2006/06/17 22:41:18 adamdunkels Exp $
|
* @(#)$Id: symtab.h,v 1.2 2006/12/01 15:05:21 bg- Exp $
|
||||||
*/
|
*/
|
||||||
#ifndef __SYMTAB_H__
|
#ifndef __SYMTAB_H__
|
||||||
#define __SYMTAB_H__
|
#define __SYMTAB_H__
|
||||||
|
|
||||||
const char *symtab_lookup(const char *name);
|
void *symtab_lookup(const char *name);
|
||||||
|
|
||||||
#endif /* __SYMTAB_H__ */
|
#endif /* __SYMTAB_H__ */
|
||||||
|
|
Loading…
Reference in a new issue