remove casts from xmalloc()
[oweals/busybox.git] / libbb / find_root_device.c
index 675f8d2f501b3d539d403c70143b047791d4b4cf..71b79b8d09178950dca2aafb26067740531c552e 100644 (file)
@@ -7,11 +7,6 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
-#include <limits.h>
-#include <stdio.h>
-#include <string.h>
-#include <dirent.h>
-#include <stdlib.h>
 #include "libbb.h"
 
 char *find_block_device(char *path)
@@ -28,7 +23,7 @@ char *find_block_device(char *path)
                char devpath[PATH_MAX];
                sprintf(devpath,"/dev/%s", entry->d_name);
                if(!stat(devpath, &st) && S_ISBLK(st.st_mode) && st.st_rdev == dev) {
-                       retpath = bb_xstrdup(devpath);
+                       retpath = xstrdup(devpath);
                        break;
                }
        }