Enable linting for trailing tabs ##lint

This commit is contained in:
pancake 2022-08-22 23:25:40 +02:00
parent db747e1782
commit b6e7292019
134 changed files with 708 additions and 747 deletions

View File

@ -89,7 +89,6 @@ This is an example
case '*':
case '/':
if (expect_arg) {
expect_arg = ch;
}
break;

View File

@ -28,10 +28,8 @@ static int analop(RAnal *a, RAnalOp *op, ut64 addr, const ut8 *buf, int len, RAn
if (handle == 0) {
return -1;
}
op->size = 8;
op->addr = addr;
cs_insn *insn = NULL;
int n = cs_disasm (handle, (ut8*)buf, len, addr, 1, &insn);
if (n < 1) {

View File

@ -1783,7 +1783,6 @@ R_API char *r_anal_function_format_sig(R_NONNULL RAnal *anal, R_NONNULL RAnalFun
comma = ", ";
}
}
r_list_foreach (cache->bvars, iter, var) {
if (var->isarg) {
tmp_len = strlen (var->type);
@ -1795,7 +1794,6 @@ R_API char *r_anal_function_format_sig(R_NONNULL RAnal *anal, R_NONNULL RAnalFun
}
}
}
r_list_foreach (cache->svars, iter, var) {
if (var->isarg) {
tmp_len = strlen (var->type);
@ -1807,7 +1805,6 @@ R_API char *r_anal_function_format_sig(R_NONNULL RAnal *anal, R_NONNULL RAnalFun
}
}
}
beach:
r_strbuf_append (buf, ");");
R_FREE (type_fcn_name);

View File

@ -1895,8 +1895,7 @@ static int thumb_assemble(ArmOpcode *ao, ut64 off, const char *str) {
default:
return -1;
}
} else
if (( m = opmask (ao->op, "clrex", 0) )) {
} else if (( m = opmask (ao->op, "clrex", 0) )) {
ut64 argt = thumb_selector (ao);
switch (argt) {
case THUMB_NONE: {
@ -2846,8 +2845,7 @@ static int thumb_assemble(ArmOpcode *ao, ut64 off, const char *str) {
default:
return -1;
}
} else
if ((m = opmask (ao->op, "lsr", S_BIT))) {
} else if ((m = opmask (ao->op, "lsr", S_BIT))) {
ut64 argt = thumb_selector (ao);
switch (argt) {
case THUMB_REG_REG_CONST: {

View File

@ -152,7 +152,7 @@ static bool r_debug_native_attach(RDebug *dbg, int pid) {
#else
int ret = ptrace (PTRACE_ATTACH, pid, 0, 0);
if (ret != -1) {
eprintf ("Trying to attach to %d\n", pid);
R_LOG_INFO ("Trying to attach to %d", pid);
r_sys_perror ("ptrace (PT_ATTACH)");
}
return true;
@ -193,7 +193,7 @@ static bool r_debug_native_continue_syscall(RDebug *dbg, int pid, int num) {
errno = 0;
return ptrace (PTRACE_SYSCALL, pid, (void*)(size_t)pc, 0) == 0;
#else
eprintf ("TODO: continue syscall not implemented yet\n");
R_LOG_INFO ("TODO: continue syscall not implemented yet");
return false;
#endif
}
@ -506,15 +506,15 @@ static RDebugReasonType r_debug_native_wait(RDebug *dbg, int pid) {
if (reason == R_DEBUG_REASON_UNKNOWN) {
#endif
if (WIFEXITED (status)) {
eprintf ("child exited with status %d\n", WEXITSTATUS (status));
R_LOG_INFO ("child exited with status %d", WEXITSTATUS (status));
reason = R_DEBUG_REASON_DEAD;
} else if (WIFSIGNALED (status)) {
eprintf ("child received signal %d\n", WTERMSIG (status));
R_LOG_INFO ("child received signal %d", WTERMSIG (status));
reason = R_DEBUG_REASON_SIGNAL;
} else if (WIFSTOPPED (status)) {
if (WSTOPSIG (status) != SIGTRAP &&
WSTOPSIG (status) != SIGSTOP) {
eprintf ("Child stopped with signal %d\n", WSTOPSIG (status));
R_LOG_INFO ("Child stopped with signal %d", WSTOPSIG (status));
}
/* the ptrace documentation says GETSIGINFO is only necessary for
@ -532,7 +532,7 @@ static RDebugReasonType r_debug_native_wait(RDebug *dbg, int pid) {
#endif
#ifdef WIFCONTINUED
} else if (WIFCONTINUED (status)) {
eprintf ("child continued...\n");
R_LOG_INFO ("child continued");
reason = R_DEBUG_REASON_NONE;
#endif
} else if (status == 1) {
@ -555,7 +555,7 @@ static RDebugReasonType r_debug_native_wait(RDebug *dbg, int pid) {
/* if we still don't know what to do, we have a problem... */
if (reason == R_DEBUG_REASON_UNKNOWN) {
eprintf ("%s: no idea what happened... wtf?!?!\n", __func__);
R_LOG_INFO ("no idea what happened here");
reason = R_DEBUG_REASON_ERROR;
}
#endif // __APPLE__

View File

@ -14,7 +14,6 @@
* Lesser General Public License for more details.
*/
/*
* Automatically generated by gensflib.py
* Mon Nov 28 13:53:31 2011
@ -23,12 +22,10 @@
#ifndef SFLIB_H
#define SFLIB_H
#include "sfsysnr.h"
#include "sfsyscall.h"
#include "../common/sftypes.h"
static inline _sfsyscall3( ssize_t, read, int, fd, void *, buf, size_t, count )
static inline _sfsyscall3( ssize_t, write, int, fd, const void *, buf, size_t, count )
static inline _sfsyscall3( int, open, const char *, pathname, int, flags, mode_t, mode )
@ -327,8 +324,6 @@ static inline _sfsyscall1( time_t, time, time_t *, t )
// preadv
// pwritev
//#include "../common/sfsocketcall.h"
#endif /* SFLIB_H */

View File

@ -327,8 +327,5 @@ static inline _sfsyscall1( time_t, time, time_t *, t )
// preadv
// pwritev
//#include "../common/sfsocketcall.h"
#endif /* SFLIB_H */

View File

@ -23,12 +23,10 @@
#ifndef SFLIB_H
#define SFLIB_H
#include "sfsysnr.h"
#include "sfsyscall.h"
#include "../common/sftypes.h"
static inline _sfsyscall1(void, exit, int, status)
static inline _sfsyscall0( pid_t, fork )
static inline _sfsyscall3( ssize_t, read, int, fd, void *, buf, size_t, count )
@ -219,8 +217,6 @@ static inline _sfsyscall0( pid_t, vfork )
// getrlimit
static inline _sfsyscall6(void *,mmap, void *,start, size_t,length, int,prot , int,flags, int,fd, off_t,offset)
#include "../common/sfsocketcall.h"
#endif /* SFLIB_H */

View File

@ -294,7 +294,7 @@
>>>470 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp Bootloader
>112 string This\ disk\ is\ not\ bootable\r
>>142 string If\ you\ wish\ to\ make\ it\ bootable
>>>176 string run\ the\ DOS\ program\ SYS\
>>>176 string run\ the\ DOS\ program\ SYS
>>>200 string after\ the\r
>>>>216 string system\ has\ been\ loaded\r\n
>>>>>242 string Please\ insert\ a\ DOS\ diskette\

View File

@ -130,9 +130,7 @@ static int show_analinfo(RAsmState *as, const char *arg, ut64 offset) {
free (buf);
return 0;
}
RAnalOp aop = {0};
if (as->json) {
pj_a (pj);
}

View File

@ -185,7 +185,6 @@ static int parse(RParse *p, const char *data, char *str) {
*w0 = *w1 = *w2 = *w3 = '\0';
if (*buf) {
end = buf + strlen (buf);
ptr = strchr (buf, '(');
if (!ptr) {
ptr = strchr (buf, ' ');

View File

@ -404,7 +404,6 @@ static int handle_redirection_proc(const char *cmd, bool in, bool out, bool err)
close (saved_stdin);
return -1;
}
int fdm, pid = dyn_forkpty (&fdm, NULL, NULL, NULL);
if (pid == -1) {
close (saved_stdin);

View File

@ -51,7 +51,6 @@ R_API char *r_print_randomart(const ut8 *dgst_raw, ut32 dgst_raw_len, ut64 addr)
ut32 i, b;
int x, y;
size_t len = strlen (augmentation_string) - 1;
// 2*(FLDSIZE_X+3) there are two for loops that iterate over this
// FLDSIZE_Y * (FLDSIZE_X+3) there is a loop that for each y iterates over the whole FLDSIZE_X
// The rest is counting the +--[0x%08"PFMT64x"]- and '\0'

View File

@ -1576,8 +1576,7 @@ doinsert(struct parse *p, sop op, size_t opnd, sopno pos)
}
}
}
memmove((char *)&p->strip[pos+1], (char *)&p->strip[pos],
memmove ((char *)&p->strip[pos+1], (char *)&p->strip[pos],
(HERE()-pos-1)*sizeof (sop));
p->strip[pos] = s;
}
@ -1585,9 +1584,7 @@ doinsert(struct parse *p, sop op, size_t opnd, sopno pos)
/*
- dofwd - complete a forward reference
*/
static void
dofwd(struct parse *p, sopno pos, sop value)
{
static void dofwd(struct parse *p, sopno pos, sop value) {
/* avoid making error situations worse */
if (p->error != 0) {
return;
@ -1601,9 +1598,7 @@ dofwd(struct parse *p, sopno pos, sop value)
/*
- enlarge - enlarge the strip
*/
static void
enlarge(struct parse *p, sopno size)
{
static void enlarge(struct parse *p, sopno size) {
sop *sp;
if (p->ssize >= size) {

View File

@ -199,13 +199,11 @@ R_API bool r_sandbox_enable(bool e) {
};
size_t i, privrulescnt = sizeof (privrules) / sizeof (privrules[0]);
if (!priv) {
eprintf ("sandbox: priv_allocset failed\n");
return false;
}
priv_basicset (priv);
for (i = 0; i < privrulescnt; i ++) {
if (priv_delset (priv, privrules[i]) != 0) {
priv_emptyset (priv);

View File

@ -320,7 +320,6 @@ R_API bool r_w32_init(void) {
// w32_DebugBreakProcess = (BOOL (*)(HANDLE)) GetProcAddress (lib, "DebugBreakProcess");
// Windows XP
// w32_CreateToolhelp32Snapshot = (HANDLE (*)(DWORD, DWORD)) GetProcAddress (lib, "CreateToolhelp32Snapshot");
// only windows vista :(
w32_GetThreadId = (DWORD (*)(HANDLE))
GetProcAddress (lib, "GetThreadId");

View File

@ -1105,7 +1105,6 @@ int gdbr_write_registers(libgdbr_t *g, char *registers) {
unsigned int x, len;
char *command, *reg, *buff, *value;
// read current register set
command = buff = value = NULL;
if (!g) {

View File

@ -88,7 +88,6 @@ int sdb_js0n(const ut8 *js, RangstrType len, RangstrType *out) {
['f'] = &&l_unesc, ['n'] = &&l_unesc, ['r'] = &&l_unesc, ['t'] = &&l_unesc, ['u'] = &&l_unesc
};
const void *const *go = gostruct;
#if 0
printf (" gostrct= %p\n", gostruct);
printf (" gobare = %p\n", gobare);

View File

@ -222,7 +222,6 @@ _zip_set_open_error(int *zep, const zip_error_t *err, int ze) {
case ZIP_ET_LIBZIP:
errno = zip_error_code_system(err);
break;
default:
break;
}

View File

@ -13,7 +13,7 @@
(git grep -n 'for (long' | grep -v sys/) && exit 1
(git grep -n 'for (ut' | grep -v sys/) && exit 1
(git grep -n 'for (size_t' | grep -v sys/) && exit 1
# (git grep -n -e ' $' | grep -v sys/) && exit 1
(git grep -n -e ' $' | grep libr/ | grep c:) && exit 1
(git grep -n 'R_LOG_' | grep '\\n' | grep -v sys/) && exit 1
(git grep "`printf '\tfree('`" libr | grep c: ) && exit 1
(git grep '=0' libr| grep c:|grep -v '"' |grep -v '=0x') && exit 1

View File

@ -57,7 +57,9 @@ static int anal_op(char *buf, int bits) {
printf ("rop: 0x%lx 0x%lx 0x%lx 0x%lx \n",
io.rop[0], io.rop[1], io.rop[2], io.rop[3]);
printf ("rop_count: 0x%x\n", io.rop_count);
} else eprintf ("Error: Unknown opcode\n");
} else {
R_LOG_ERROR ("Unknown opcode");
}
return ret;
}

View File

@ -63,7 +63,6 @@ static bool test_r_id_storage_prev_next_eq_1(void) {
r = r_id_storage_get_next (ids, &id);
mu_assert_true (r, "get_prev(1) must exist");
r_id_storage_free (ids);
mu_assert_eq (id, id1, "r_id_storage_{next/prev} reversal 1");
mu_end;
}
@ -102,7 +101,6 @@ static bool test_r_id_storage_empty(void) {
r = r_id_storage_get_lowest (ids, &_id);
mu_assert_false (r, "get low from none");
r_id_storage_free (ids);
mu_end;
}
@ -117,7 +115,6 @@ static bool test_r_id_storage_prev_next_eq_2(void) {
r_id_storage_get_prev (ids, &_id);
r_id_storage_get_next (ids, &_id);
r_id_storage_free (ids);
mu_assert_eq (id, _id, "r_id_storage_{next/prev} reversal 2");
mu_end;
}

View File

@ -64,7 +64,6 @@ static bool test_anal_sign_get_set(void) {
r_sign_add_comment (anal, "sym.boring", "gee it sure is boring around here");
// --
r_spaces_set (&anal->zign_spaces, NULL);
item = r_sign_get_item (anal, "sym.mahboi");
mu_assert_notnull (item, "get item");
@ -107,7 +106,6 @@ static bool test_anal_sign_get_set(void) {
mu_assert_notnull (item->hash, "hash");
mu_assert_streq (item->hash->bbhash, "7bfa1358c427e26bc03c2384f41de7be6ebc01958a57e9a6deda5bdba9768851", "hash val");
r_sign_item_free (item);
r_spaces_set (&anal->zign_spaces, "koridai");
item = r_sign_get_item (anal, "sym.boring");
mu_assert_notnull (item, "get item in space");