mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Checkpatch fixes
This commit is contained in:
parent
197bedc6ff
commit
0c63f474a3
|
@ -768,6 +768,7 @@ static char *xdirname(const char *path)
|
|||
static char *xbasename(char *path)
|
||||
{
|
||||
char *base = xmemrchr((uchar *)path, '/', strlen(path));
|
||||
|
||||
return base ? base + 1 : path;
|
||||
}
|
||||
|
||||
|
@ -788,7 +789,7 @@ static uint xatoi(const char *str)
|
|||
|
||||
static char *xitoa(uint val)
|
||||
{
|
||||
const char hexbuf[] = "0123456789";
|
||||
static const char hexbuf[] = "0123456789";
|
||||
static char ascbuf[32] = {0};
|
||||
int i;
|
||||
|
||||
|
@ -917,7 +918,7 @@ static bool cpsafe(void)
|
|||
}
|
||||
|
||||
/* Reset copy indicators */
|
||||
static void resetcpind()
|
||||
static void resetcpind(void)
|
||||
{
|
||||
int r = 0;
|
||||
|
||||
|
@ -1969,6 +1970,7 @@ static char *get_bm_loc(char *buf, int key)
|
|||
}
|
||||
|
||||
ssize_t count = xstrlcpy(buf, home, PATH_MAX);
|
||||
|
||||
xstrlcpy(buf + count - 1, bookmark[r].loc + 1, PATH_MAX - count - 1);
|
||||
} else
|
||||
xstrlcpy(buf, bookmark[r].loc, PATH_MAX);
|
||||
|
@ -2830,6 +2832,7 @@ static void redraw(char *path)
|
|||
printptr(&dents[i], i == cur, ncols);
|
||||
} else {
|
||||
const int odd = ISODD(nlines);
|
||||
|
||||
nlines >>= 1;
|
||||
for (i = cur - nlines; i < cur + nlines + odd; ++i)
|
||||
printptr(&dents[i], i == cur, ncols);
|
||||
|
|
Loading…
Reference in a new issue