summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuillem Jover <guillem@hadrons.org>2010-01-21 14:34:55 +0100
committerGuillem Jover <guillem@hadrons.org>2010-01-21 14:34:55 +0100
commit30c794083f5211ecf82f5c3614f35a16a7e4d354 (patch)
tree3721eeaeeb6e24d28a3b938fb1d3eb546e9b6a83 /src
parentddebbd6792e5c7ae53fb96cdc46566fc843adaa5 (diff)
downloadlibbsd-30c794083f5211ecf82f5c3614f35a16a7e4d354.tar.gz
Make setprogname and getprogname arguments and return value const
This is more correct as the strings are not going to be changed, and it matches the function signatures on other BSDs. Suggested-by: Aurelien Jarno <aurel32@debian.org>
Diffstat (limited to 'src')
-rw-r--r--src/progname.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/progname.c b/src/progname.c
index 0a47c22..a5675c0 100644
--- a/src/progname.c
+++ b/src/progname.c
@@ -1,5 +1,6 @@
/*
* Copyright © 2006 Robert Millan
+ * Copyright © 2010 Guillem Jover
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -30,16 +31,16 @@
#include <bsd/stdlib.h>
-static char *__progname = NULL;
+static const char *__progname = NULL;
-char *
-getprogname()
+const char *
+getprogname(void)
{
return __progname;
}
void
-setprogname(char *new)
+setprogname(const char *new)
{
__progname = new;
}