Commit 657bca99 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Add const declaration to immutable data.

parent 43aab0e4
......@@ -45,7 +45,7 @@ int cdiPartabIntern = 1;
double cdiDefaultMissval = -9.E33;
char *Filetypes[] = {
const char Filetypes[][9] = {
"UNKNOWN",
"GRIB",
"GRIB2",
......@@ -274,9 +274,9 @@ void cdiInitialize(void)
}
char *strfiletype(int filetype)
const char *strfiletype(int filetype)
{
char *name;
const char *name;
int size = (int) (sizeof(Filetypes)/sizeof(char *));
if ( filetype > 0 && filetype < size )
......
......@@ -296,7 +296,7 @@ int stream_new_var(stream_t *streamptr, int gridID, int zaxisID);
int tstepsNewEntry(stream_t *streamptr);
char *strfiletype(int filetype);
const char *strfiletype(int filetype);
void cdi_generate_vars(stream_t *streamptr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment