* "This program is in the Public Domain."
*/
-#include "internal.h"
+#include "busybox.h"
#include <sys/types.h>
-#include <sys/stat.h>
#include <unistd.h>
#include <ctype.h>
#include <errno.h>
fatalError("missing ]\n");
argv[argc] = NULL;
}
- if (strcmp(argv[1], dash_dash_help) == 0) {
- usage("test EXPRESSION\n"
- "or [ EXPRESSION ]\n"
-#ifndef BB_FEATURE_TRIVIAL_HELP
- "\nChecks file types and compares values returning an exit\n"
- "code determined by the value of EXPRESSION.\n"
-#endif
- );
- }
-
/* Implement special cases from POSIX.2, section 4.62.4 */
switch (argc) {
case 1:
enum token mode;
{
struct stat s;
- int i;
+ unsigned int i;
if (mode == FILSYM) {
#ifdef S_IFLNK
int mode;
{
struct stat st;
- int euid = geteuid();
+ unsigned int euid = geteuid();
if (stat (path, &st) < 0)
return (-1);
initialize_group_array ()
{
ngroups = getgroups(0, NULL);
- if ((group_array = realloc(group_array, ngroups * sizeof(gid_t))) == NULL)
- fatalError("Out of space\n");
-
+ group_array = xrealloc(group_array, ngroups * sizeof(gid_t));
getgroups(ngroups, group_array);
}