aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs/e2p/feature.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-06-11 00:08:50 +0000
committerMike Frysinger <vapier@gentoo.org>2005-06-11 00:08:50 +0000
commit85cffcc83dfa8471c458789474513171ff9281df (patch)
tree6890b22c5a78b5166952d173a7d1a2bd94afca1b /e2fsprogs/e2p/feature.c
parent942e137679ef3e07036cc32689ea7c802304cd1d (diff)
downloadbusybox-85cffcc83dfa8471c458789474513171ff9281df.tar.gz
recode functions to shrink size
Diffstat (limited to 'e2fsprogs/e2p/feature.c')
-rw-r--r--e2fsprogs/e2p/feature.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/e2fsprogs/e2p/feature.c b/e2fsprogs/e2p/feature.c
index ef11d93b7..f4e920a98 100644
--- a/e2fsprogs/e2p/feature.c
+++ b/e2fsprogs/e2p/feature.c
@@ -56,10 +56,10 @@ static struct feature feature_list[] = {
const char *e2p_feature2string(int compat, unsigned int mask)
{
- struct feature *f;
+ struct feature *f;
static char buf[20];
- char fchar;
- int fnum;
+ char fchar;
+ int fnum;
for (f = feature_list; f->string; f++) {
if ((compat == f->compat) &&
@@ -67,7 +67,7 @@ const char *e2p_feature2string(int compat, unsigned int mask)
return f->string;
}
switch (compat) {
- case E2P_FEATURE_COMPAT:
+ case E2P_FEATURE_COMPAT:
fchar = 'C';
break;
case E2P_FEATURE_INCOMPAT:
@@ -81,15 +81,15 @@ const char *e2p_feature2string(int compat, unsigned int mask)
break;
}
for (fnum = 0; mask >>= 1; fnum++);
- sprintf(buf, "FEATURE_%c%d", fchar, fnum);
+ sprintf(buf, "FEATURE_%c%d", fchar, fnum);
return buf;
}
int e2p_string2feature(char *string, int *compat_type, unsigned int *mask)
{
- struct feature *f;
- char *eptr;
- int num;
+ struct feature *f;
+ char *eptr;
+ int num;
for (f = feature_list; f->string; f++) {
if (!strcasecmp(string, f->string)) {
@@ -128,14 +128,14 @@ int e2p_string2feature(char *string, int *compat_type, unsigned int *mask)
return 0;
}
-static char *skip_over_blanks(char *cp)
+static inline char *skip_over_blanks(char *cp)
{
while (*cp && isspace(*cp))
cp++;
return cp;
}
-static char *skip_over_word(char *cp)
+static inline char *skip_over_word(char *cp)
{
while (*cp && !isspace(*cp) && *cp != ',')
cp++;
@@ -187,4 +187,3 @@ int e2p_edit_feature(const char *str, __u32 *compat_array, __u32 *ok_array)
}
return 0;
}
-