summaryrefslogtreecommitdiffstats
path: root/toolbox
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2013-11-27 16:12:48 -0800
committerNick Kralevich <nnk@google.com>2013-11-27 16:12:48 -0800
commit8dfdf650abf4a9c05dbc7c60b7baee22e43c07b5 (patch)
treeea5f20ad597e030e46a0361ff5881c406447a4fa /toolbox
parent71e096c894b2b49b0ae63a852c0a8a5a6de0c8a7 (diff)
downloadsystem_core-8dfdf650abf4a9c05dbc7c60b7baee22e43c07b5.tar.gz
system_core-8dfdf650abf4a9c05dbc7c60b7baee22e43c07b5.tar.bz2
system_core-8dfdf650abf4a9c05dbc7c60b7baee22e43c07b5.zip
Minor cleanups.
Use ssize_t for handling the result of a readlink call. Fix the following compiler warning: system/core/toolbox/ls.c: In function 'listfile_maclabel': system/core/toolbox/ls.c:238:68: warning: unused parameter 'flags' [-Wunused-parameter] static int listfile_maclabel(const char *path, struct stat *s, int flags) Change-Id: Idd65f3349fb9dfb6f7a374c81f72d3169af33505
Diffstat (limited to 'toolbox')
-rw-r--r--toolbox/ls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/toolbox/ls.c b/toolbox/ls.c
index c73695808..8467628ad 100644
--- a/toolbox/ls.c
+++ b/toolbox/ls.c
@@ -209,7 +209,7 @@ static int listfile_long(const char *path, struct stat *s, int flags)
break;
case S_IFLNK: {
char linkto[256];
- int len;
+ ssize_t len;
len = readlink(path, linkto, 256);
if(len < 0) return -1;
@@ -235,7 +235,7 @@ static int listfile_long(const char *path, struct stat *s, int flags)
return 0;
}
-static int listfile_maclabel(const char *path, struct stat *s, int flags)
+static int listfile_maclabel(const char *path, struct stat *s)
{
char mode[16];
char user[32];
@@ -324,7 +324,7 @@ static int listfile(const char *dirname, const char *filename, int flags)
}
if ((flags & LIST_MACLABEL) != 0) {
- return listfile_maclabel(pathname, &s, flags);
+ return listfile_maclabel(pathname, &s);
} else if ((flags & LIST_LONG) != 0) {
return listfile_long(pathname, &s, flags);
} else /*((flags & LIST_SIZE) != 0)*/ {