summaryrefslogtreecommitdiff
path: root/src/libstddjb/sgetopt.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2016-01-14 20:09:51 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2016-01-14 20:09:51 +0000
commitdb086527035619204569f79672b7a01fc26d8aa4 (patch)
treeea5a305a25d5fdb717b385e7beef075254d9ac6f /src/libstddjb/sgetopt.c
parent8849baf295715efd428e9243b67b2576a41f8fe4 (diff)
downloadskalibs-db086527035619204569f79672b7a01fc26d8aa4.tar.xz
Fix/clarify utilisations of 'char' (thanks Esben Haabendal)
Diffstat (limited to 'src/libstddjb/sgetopt.c')
-rw-r--r--src/libstddjb/sgetopt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstddjb/sgetopt.c b/src/libstddjb/sgetopt.c
index 3f94c93..f576689 100644
--- a/src/libstddjb/sgetopt.c
+++ b/src/libstddjb/sgetopt.c
@@ -9,7 +9,7 @@
int sgetopt_r (int argc, char const *const *argv, char const *opts, subgetopt_t *o)
{
- char c = (char)subgetopt_r(argc, argv, opts, o) ;
+ int c = subgetopt_r(argc, argv, opts, o) ;
if (o->err && ((c == '?') || (c == ':')))
{
buffer_puts(buffer_2, o->prog ? o->prog : argv[0]) ;
@@ -18,5 +18,5 @@ int sgetopt_r (int argc, char const *const *argv, char const *opts, subgetopt_t
"illegal option" : "option requires an argument") ;
buffer_putflush(buffer_2, "\n", 1) ;
}
- return (int)c ;
+ return c ;
}