summaryrefslogtreecommitdiffstats
path: root/common/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/utils.c')
-rw-r--r--common/utils.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/utils.c b/common/utils.c
index fb6822f..f95ecfd 100644
--- a/common/utils.c
+++ b/common/utils.c
@@ -139,6 +139,16 @@ char *string_build_path(const char *elem, ...)
139 return out; 139 return out;
140} 140}
141 141
142char *string_toupper(char* str)
143{
144 char *res = strdup(str);
145 unsigned int i;
146 for (i = 0; i < strlen(res); i++) {
147 res[i] = toupper(res[i]);
148 }
149 return res;
150}
151
142static int get_rand(int min, int max) 152static int get_rand(int min, int max)
143{ 153{
144 int retval = (rand() % (max - min)) + min; 154 int retval = (rand() % (max - min)) + min;