mirror of
https://github.com/sstefani/mtrace.git
synced 2025-12-06 16:56:41 +08:00
fixes for ubuntu 12.04
fix some compiler complains
This commit is contained in:
parent
376bcb2581
commit
96cd4a6ce8
@ -246,8 +246,12 @@ char **process_options(int argc, char **argv)
|
||||
char *output = NULL;
|
||||
char *cwd = NULL;
|
||||
|
||||
if (!sockdef)
|
||||
asprintf(&sockdef, "/tmp/mtrace%u.sock", getuid());
|
||||
if (!sockdef) {
|
||||
if (asprintf(&sockdef, "/tmp/mtrace%u.sock", getuid()) == -1) {
|
||||
fprintf(stderr, "%s\n", strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
progname = argv[0];
|
||||
|
||||
|
||||
@ -272,7 +272,7 @@ void *mem_scan(struct task *task, struct mt_msg *cmd, void *payload, unsigned lo
|
||||
}
|
||||
|
||||
if (do_peek) {
|
||||
if (copy_from_proc(task, ARCH_ADDR_T(start), page_buf, sizeof(page_buf)) != sizeof(page_buf)) {
|
||||
if (copy_from_proc(task, ARCH_ADDR_T(start), page_buf, sizeof(page_buf)) != (int)sizeof(page_buf)) {
|
||||
fprintf(stderr, "ptrace (%s)\n", strerror(errno));
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user