aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs/e2p/ostype.c
diff options
context:
space:
mode:
Diffstat (limited to 'e2fsprogs/e2p/ostype.c')
-rw-r--r--e2fsprogs/e2p/ostype.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/e2fsprogs/e2p/ostype.c b/e2fsprogs/e2p/ostype.c
index fe6597dd5..a079b57b1 100644
--- a/e2fsprogs/e2p/ostype.c
+++ b/e2fsprogs/e2p/ostype.c
@@ -23,17 +23,17 @@ const char *os_tab[] =
23 */ 23 */
24char *e2p_os2string(int os_type) 24char *e2p_os2string(int os_type)
25{ 25{
26 const char *os; 26 const char *os;
27 char *ret; 27 char *ret;
28 28
29 if (os_type <= EXT2_OS_LITES) 29 if (os_type <= EXT2_OS_LITES)
30 os = os_tab[os_type]; 30 os = os_tab[os_type];
31 else 31 else
32 os = "(unknown os)"; 32 os = "(unknown os)";
33 33
34 ret = malloc(strlen(os)+1); 34 ret = xmalloc(strlen(os)+1);
35 strcpy(ret, os); 35 strcpy(ret, os);
36 return ret; 36 return ret;
37} 37}
38 38
39/* 39/*
@@ -41,8 +41,8 @@ char *e2p_os2string(int os_type)
41 */ 41 */
42int e2p_string2os(char *str) 42int e2p_string2os(char *str)
43{ 43{
44 const char **cpp; 44 const char **cpp;
45 int i = 0; 45 int i = 0;
46 46
47 for (cpp = os_tab; *cpp; cpp++, i++) { 47 for (cpp = os_tab; *cpp; cpp++, i++) {
48 if (!strcasecmp(str, *cpp)) 48 if (!strcasecmp(str, *cpp))