summaryrefslogtreecommitdiffstats
path: root/login-utils
diff options
context:
space:
mode:
authorKarel Zak2019-01-11 12:15:00 +0100
committerKarel Zak2019-01-11 12:15:22 +0100
commit623427456eb632bb0b041b5fe430f70d2d3ce232 (patch)
tree34810fcaef904724f3f812688edf9fecc72befc7 /login-utils
parentfstrim: check for read-only devices on -a/-A (diff)
downloadkernel-qcow2-util-linux-623427456eb632bb0b041b5fe430f70d2d3ce232.tar.gz
kernel-qcow2-util-linux-623427456eb632bb0b041b5fe430f70d2d3ce232.tar.xz
kernel-qcow2-util-linux-623427456eb632bb0b041b5fe430f70d2d3ce232.zip
login-utils/logindefs: clenaup API
The default value should be unsigned if the result is also unsigned... Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils')
-rw-r--r--login-utils/logindefs.c2
-rw-r--r--login-utils/logindefs.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/login-utils/logindefs.c b/login-utils/logindefs.c
index ebf1a9f3a..07a977660 100644
--- a/login-utils/logindefs.c
+++ b/login-utils/logindefs.c
@@ -196,7 +196,7 @@ int getlogindefs_bool(const char *name, int dflt)
return ptr && ptr->value ? (strcasecmp(ptr->value, "yes") == 0) : dflt;
}
-unsigned long getlogindefs_num(const char *name, long dflt)
+unsigned long getlogindefs_num(const char *name, unsigned long dflt)
{
struct item *ptr = search(name);
char *end = NULL;
diff --git a/login-utils/logindefs.h b/login-utils/logindefs.h
index 064737c6c..b83ac4824 100644
--- a/login-utils/logindefs.h
+++ b/login-utils/logindefs.h
@@ -4,7 +4,7 @@
extern void logindefs_load_file(const char *filename);
extern void logindefs_set_loader(void (*loader)(void *data), void *data);
extern int getlogindefs_bool(const char *name, int dflt);
-extern unsigned long getlogindefs_num(const char *name, long dflt);
+extern unsigned long getlogindefs_num(const char *name, unsigned long dflt);
extern const char *getlogindefs_str(const char *name, const char *dflt);
extern void free_getlogindefs_data(void);
extern int logindefs_setenv(const char *name, const char *conf, const char *dflt);