Fix checkpatch reports

This commit is contained in:
Arun Prakash Jana 2017-12-28 01:47:44 +05:30
parent 2c50c92b3d
commit 9b010b1c03

10
nnn.c
View file

@ -1094,7 +1094,8 @@ xreadline(char *fname)
}
buf[len] = '\0';
if (old_curs != ERR) curs_set(old_curs);
if (old_curs != ERR)
curs_set(old_curs);
settimeout();
DPRINTF_S(buf);
@ -1191,6 +1192,7 @@ get_bm_loc(char *key, char *buf)
if (xstrcmp(bookmark[r].key, key) == 0) {
if (bookmark[r].loc[0] == '~') {
char *home = getenv("HOME");
if (!home) {
DPRINTF_S(STR_NOHOME);
return NULL;
@ -1270,6 +1272,7 @@ coolsize(off_t size)
static char size_buf[12]; /* Buffer to hold human readable size */
static int i;
static off_t tmp;
static long double rem;
static const double div_2_pow_10 = 1.0 / 1024.0;
@ -1993,6 +1996,7 @@ populate(char *path, char *oldname, char *fltr)
#ifdef DEBUGMODE
struct timespec ts1, ts2;
clock_gettime(CLOCK_REALTIME, &ts1); /* Use CLOCK_MONOTONIC on FreeBSD */
#endif
@ -2741,10 +2745,10 @@ nochange:
r = getch();
settimeout();
if (r == 'f') {
r = openat(fd, tmp, O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
r = openat(fd, tmp, O_CREAT, 0666);
close(r);
} else if (r == 'd')
r = mkdirat(fd, tmp, S_IRWXU | S_IRWXG | S_IRWXO);
r = mkdirat(fd, tmp, 0777);
else {
close(fd);
break;