Fix constness problems.

This commit is contained in:
bg- 2006-12-01 15:05:20 +00:00
parent 5d970109c8
commit 0191c11595
3 changed files with 7 additions and 7 deletions

View file

@ -28,14 +28,14 @@
*
* 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__
#define __SYMBOLS_H__
struct symbols {
const char *name;
const char *value;
void *value;
};
extern const struct symbols symbols[];

View file

@ -28,7 +28,7 @@
*
* 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"
@ -38,11 +38,11 @@
#include <string.h>
/*---------------------------------------------------------------------------*/
const char *
void *
symtab_lookup(const char *name)
{
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) {
return s->value;
}

View file

@ -28,11 +28,11 @@
*
* 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__
#define __SYMTAB_H__
const char *symtab_lookup(const char *name);
void *symtab_lookup(const char *name);
#endif /* __SYMTAB_H__ */