From: John Darrington Date: Sun, 25 Nov 2012 10:07:44 +0000 (+0100) Subject: file handle properties: Make encoding member const X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=142e7fd7a625e9686f8d14b54b20cf8aff696720;p=pspp file handle properties: Make encoding member const This member is never modified. So declare it as const. This way it can be initialised from a static string. --- diff --git a/src/data/file-handle-def.h b/src/data/file-handle-def.h index 9a60e72423..53e1bbfb6d 100644 --- a/src/data/file-handle-def.h +++ b/src/data/file-handle-def.h @@ -55,7 +55,7 @@ struct fh_properties enum fh_mode mode; /* File mode. */ size_t record_width; /* Length of fixed-format records. */ size_t tab_width; /* Tab width, 0=do not expand tabs. */ - char *encoding; /* Charset for contents. */ + const char *encoding; /* Charset for contents. */ }; void fh_init (void);