summaryrefslogtreecommitdiff
path: root/soltools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-02-11 13:20:49 +0200
committerNoel Grandin <noel@peralex.com>2015-02-23 09:26:58 +0200
commitba233e87efddf0a6751b35784dca1c805364ff3b (patch)
tree9d7c8a4256e688c2d47cb6ecf580ac196c4da2c0 /soltools
parenta2fa9e2468aa5c4fd4b610c5d0ebc8959e87a072 (diff)
remove unnecessary parenthesis in return statements
found with $ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;' Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
Diffstat (limited to 'soltools')
-rw-r--r--soltools/mkdepend/cppsetup.c2
-rw-r--r--soltools/mkdepend/include.c18
-rw-r--r--soltools/mkdepend/main.c18
-rw-r--r--soltools/mkdepend/parse.c26
4 files changed, 32 insertions, 32 deletions
diff --git a/soltools/mkdepend/cppsetup.c b/soltools/mkdepend/cppsetup.c
index c57fe0cb6a9e..a21457b27299 100644
--- a/soltools/mkdepend/cppsetup.c
+++ b/soltools/mkdepend/cppsetup.c
@@ -93,7 +93,7 @@ cppsetup(line, filep, inc)
outp=inp;
value = yyparse();
*p = savec;
- return(value);
+ return value;
}
pperror(tag, x0,x1,x2,x3,x4)
diff --git a/soltools/mkdepend/include.c b/soltools/mkdepend/include.c
index 4cfbff7d6fdc..cb1cc17750eb 100644
--- a/soltools/mkdepend/include.c
+++ b/soltools/mkdepend/include.c
@@ -144,7 +144,7 @@ struct inclist *inc_path(char *file, char *include, boolean dot, struct Includes
if (!found)
ip = NULL;
- return(ip);
+ return ip;
}
int exists_path(struct IncludesCollection *incCollection, char *path)
@@ -229,15 +229,15 @@ void remove_dotdot(char *path)
int isdot(char *p)
{
if(p && p[0] == '.' && p[1] == '\0')
- return(TRUE);
- return(FALSE);
+ return TRUE;
+ return FALSE;
}
int isdotdot(char *p)
{
if(p && p[0] == '.' && p[1] == '.' && p[2] == '\0')
- return(TRUE);
- return(FALSE);
+ return TRUE;
+ return FALSE;
}
int issymbolic(char *dir, char *component)
@@ -249,16 +249,16 @@ int issymbolic(char *dir, char *component)
sprintf(buf, "%s%s%s", dir, *dir ? "/" : "", component);
for (pp=notdotdot; *pp; pp++)
if (strcmp(*pp, buf) == 0)
- return (TRUE);
+ return TRUE;
if (lstat(buf, &st) == 0
&& (st.st_mode & S_IFMT) == S_IFLNK) {
*pp++ = copy(buf);
if (pp >= &notdotdot[ MAXDIRS ])
fatalerr("out of .. dirs, increase MAXDIRS\n");
- return(TRUE);
+ return TRUE;
}
#endif
- return(FALSE);
+ return FALSE;
}
/*
@@ -281,7 +281,7 @@ struct inclist *newinclude(char *newfile, char *incstring)
else
ip->i_incstring = copy(incstring);
- return(ip);
+ return ip;
}
void included_by(struct inclist *ip, struct inclist *newfile)
diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c
index 9c63e0e629e3..93c971db687b 100644
--- a/soltools/mkdepend/main.c
+++ b/soltools/mkdepend/main.c
@@ -486,7 +486,7 @@ struct filepointer *getfile(char *file)
warning("makedepend: Cannot open file \"%s\"\n", file);
content->f_p = content->f_base = content->f_end = (char *)malloc(1);
*content->f_p = '\0';
- return(content);
+ return content;
}
(void)fstat(fd, &st);
@@ -501,7 +501,7 @@ struct filepointer *getfile(char *file)
warning("makedepend: File \"%s\" is too large.\n", file);
content->f_p = content->f_base = content->f_end = (char *)malloc(1);
*content->f_p = '\0';
- return(content);
+ return content;
}
content->f_base = (char *)malloc(malloc_size+1);
@@ -517,7 +517,7 @@ struct filepointer *getfile(char *file)
content->f_end = content->f_base + bytes_read;
*content->f_end = '\0';
content->f_line = 0;
- return(content);
+ return content;
}
void freefile(struct filepointer *fp)
@@ -531,7 +531,7 @@ char *copy(char *str)
char *p = (char *)malloc(strlen(str) + 1);
strcpy(p, str);
- return(p);
+ return p;
}
int match(char *str, char **list)
@@ -540,8 +540,8 @@ int match(char *str, char **list)
for (i=0; *list; i++, list++)
if (strcmp(str, *list) == 0)
- return(i);
- return(-1);
+ return i;
+ return -1;
}
/*
@@ -558,7 +558,7 @@ char *get_line(struct filepointer *filep)
p = filep->f_p;
eof = filep->f_end;
if (p >= eof)
- return((char *)NULL);
+ return (char *)NULL;
lineno = filep->f_line;
for(bol = p--; ++p < eof; ) {
@@ -610,7 +610,7 @@ char *get_line(struct filepointer *filep)
done:
filep->f_p = p;
filep->f_line = lineno;
- return(bol);
+ return bol;
}
/*
@@ -634,7 +634,7 @@ char *base_name(char *file)
};
p--;
};
- return(file);
+ return file;
}
#if defined(USG) && !defined(CRAY) && !defined(SVR4)
diff --git a/soltools/mkdepend/parse.c b/soltools/mkdepend/parse.c
index 0c53d019b720..01adafbbbd36 100644
--- a/soltools/mkdepend/parse.c
+++ b/soltools/mkdepend/parse.c
@@ -114,7 +114,7 @@ int find_includes(struct filepointer *filep, struct inclist *file, struct inclis
/*fall-through*/
case ENDIF:
if (recursion)
- return(type);
+ return type;
/*fall-through*/
case DEFINE:
define(line, &symbols);
@@ -159,7 +159,7 @@ int find_includes(struct filepointer *filep, struct inclist *file, struct inclis
break;
}
}
- return(-1);
+ return -1;
}
int gobble(struct filepointer *filep,
@@ -189,7 +189,7 @@ int gobble(struct filepointer *filep,
debug(0,("%s, line %d: #%s\n",
file->i_file, filep->f_line,
directives[type]));
- return(type);
+ return type;
case DEFINE:
case UNDEF:
case INCLUDE:
@@ -203,14 +203,14 @@ int gobble(struct filepointer *filep,
case ELIF:
case ELIFFALSE:
case ELIFGUESSFALSE:
- return(type);
+ return type;
case -1:
warning("%s, line %d: unknown directive == \"%s\"\n",
file_red->i_file, filep->f_line, line);
break;
}
}
- return(-1);
+ return -1;
}
/*
@@ -257,19 +257,19 @@ int deftype (char *line, struct filepointer *filep, struct inclist *file_red, st
{
debug(0,("false...\n"));
if (ret == IFFALSE)
- return(ELIFFALSE);
+ return ELIFFALSE;
else
- return(ELIFGUESSFALSE);
+ return ELIFGUESSFALSE;
}
else
{
debug(0,("true...\n"));
- return(ELIF);
+ return ELIF;
}
}
if (ret < 0 || ! parse_it)
- return(ret);
+ return ret;
/*
* now decide how to parse the directive, and do it.
@@ -323,7 +323,7 @@ int deftype (char *line, struct filepointer *filep, struct inclist *file_red, st
while (*p && *p != '"' && *p != '<')
p++;
if (! *p)
- return(-2);
+ return -2;
if (*p++ == '"') {
ret = INCLUDEDOT;
while (*p && *p != '"')
@@ -354,7 +354,7 @@ int deftype (char *line, struct filepointer *filep, struct inclist *file_red, st
*/
break;
}
- return(ret);
+ return ret;
}
/*
@@ -375,9 +375,9 @@ int zero_value(char *exp, struct filepointer *filep, struct inclist *file_red, s
{
global_symbols = symbols; /* HACK! see above */
if (cppsetup(exp, filep, file_red))
- return(IFFALSE);
+ return IFFALSE;
else
- return(IF);
+ return IF;
}
void define( char *def, struct symhash **symbols )