mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-21 19:29:18 +00:00
Fix constness problems.
This commit is contained in:
parent
5d970109c8
commit
0191c11595
@ -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[];
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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__ */
|
||||
|
Loading…
Reference in New Issue
Block a user