Skip to content

Commit

Permalink
Cleanup and small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Dec 4, 2017
1 parent 70a3222 commit bb97cc5
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 15 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/out
/obj
/libs
out
*.zip
*.jks
*.apk
Expand Down
6 changes: 3 additions & 3 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def cp(source, target):

def rm(file):
try:
os.remove(file)
os.remove(file)
except OSError as e:
if e.errno != errno.ENOENT:
raise
Expand Down Expand Up @@ -435,8 +435,8 @@ def cleanup(args):
clean_parser.set_defaults(func=cleanup)

if len(sys.argv) == 1:
parser.print_help()
sys.exit(1)
parser.print_help()
sys.exit(1)

args = parser.parse_args()

Expand Down
2 changes: 2 additions & 0 deletions core/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/build
obj
libs
2 changes: 0 additions & 2 deletions core/jni/core/bootstages.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#include <fcntl.h>
#include <string.h>
#include <dirent.h>
#include <linux/loop.h>
#include <sys/ioctl.h>
#include <sys/mount.h>
#include <sys/wait.h>
#include <selinux/selinux.h>
Expand Down
1 change: 0 additions & 1 deletion core/jni/core/daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <pthread.h>
#include <signal.h>
#include <sys/un.h>
Expand Down
1 change: 0 additions & 1 deletion core/jni/core/log_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

#include <stdio.h>
#include <limits.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/wait.h>
Expand Down
2 changes: 0 additions & 2 deletions core/jni/magiskhide/hide_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <dirent.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <selinux/selinux.h>
Expand Down
1 change: 1 addition & 0 deletions core/jni/utils/cpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ void cpio_ln(struct vector *v, const char *target, const char *entry) {
cpio_entry *f = xcalloc(sizeof(*f), 1);
f->mode = S_IFLNK;
f->filename = strdup(entry);
f->filesize = strlen(target) + 1;
f->data = strdup(target);
cpio_vec_insert(v, f);
fprintf(stderr, "Create symlink [%s] -> [%s]\n", entry, target);
Expand Down
3 changes: 0 additions & 3 deletions core/jni/utils/list.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/* list.h - Double link list implementation
*/

#include <stdlib.h>
#include <string.h>

#include "list.h"

void init_list_head(struct list_head *head) {
Expand Down

0 comments on commit bb97cc5

Please sign in to comment.