diff options
author | Christos Zoulas <christos@NetBSD.org> | 2015-09-23 10:57:44 +0200 |
---|---|---|
committer | Thomas Klausner <wiz@NetBSD.org> | 2015-09-28 09:45:45 +0200 |
commit | cb5dc44303e8496450a649a97540e55887e1fe22 (patch) | |
tree | 79073b49a40bb0b9d9315d2e8689e639490b62e0 | |
parent | c644db2c3a1b6c9e5e99da130493a978a7d08010 (diff) |
Add some const.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/util.c | 4 | ||||
-rw-r--r-- | src/util.h | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -256,11 +256,11 @@ Zoom(Window wf, Window wt) * \param name the filename to expand */ char * -ExpandFilename(char *name) +ExpandFilename(const char *name) { char *newname; - if (name[0] != '~') return name; + if (name[0] != '~') return strdup(name); newname = malloc (HomeLen + strlen(name) + 2); if (!newname) { @@ -64,7 +64,7 @@ in this Software without prior written authorization from The Open Group. extern void MoveOutline ( Window root, int x, int y, int width, int height, int bw, int th ); extern void Zoom ( Window wf, Window wt ); -extern char * ExpandFilename ( char *name ); +extern char * ExpandFilename ( const char *name ); extern void GetUnknownIcon ( const char *name ); extern Pixmap FindBitmap ( const char *name, unsigned int *widthp, unsigned int *heightp ); |