Skip to content

Commit 0f05e53

Browse files
penbergtorvalds
authored andcommitted
uemacs: Fix return statements
Return statement is not a function so remove superfluous use of parenthesis. Cc: Thiago Farina <[email protected]> Signed-off-by: Pekka Enberg <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 3246438 commit 0f05e53

28 files changed

+760
-760
lines changed

ansi.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ void ansirev(int state)
176176
/* Change screen resolution. */
177177
int ansicres()
178178
{
179-
return (TRUE);
179+
return TRUE;
180180
}
181181

182182
/* Change pallette settings. */
@@ -252,7 +252,7 @@ void ansikclose(void)
252252
int fnclabel(int f, int n)
253253
{
254254
/* On machines with no function keys...don't bother. */
255-
return (TRUE);
255+
return TRUE;
256256
}
257257
#endif
258258
#endif

basic.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ int backchar(int f, int n)
6868
while (n--) {
6969
if (curwp->w_doto == 0) {
7070
if ((lp = lback(curwp->w_dotp)) == curbp->b_linep)
71-
return (FALSE);
71+
return FALSE;
7272
curwp->w_dotp = lp;
7373
curwp->w_doto = llength(lp);
7474
curwp->w_flag |= WFMOVE;
@@ -100,7 +100,7 @@ int forwchar(int f, int n)
100100
while (n--) {
101101
if (curwp->w_doto == llength(curwp->w_dotp)) {
102102
if (curwp->w_dotp == curbp->b_linep)
103-
return (FALSE);
103+
return FALSE;
104104
curwp->w_dotp = lforw(curwp->w_dotp);
105105
curwp->w_doto = 0;
106106
curwp->w_flag |= WFMOVE;
@@ -125,7 +125,7 @@ int gotoline(int f, int n)
125125
if ((status =
126126
mlreply("Line to GOTO: ", arg, NSTRING)) != TRUE) {
127127
mlwrite("(Aborted)");
128-
return (status);
128+
return status;
129129
}
130130
n = atoi(arg);
131131
}

bind.c

+39-39
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ int help(int f, int n)
2929
fname = flook(pathname[1], FALSE);
3030
if (fname == NULL) {
3131
mlwrite("(Help file is not online)");
32-
return (FALSE);
32+
return FALSE;
3333
}
3434
}
3535

3636
/* split the current window to make room for the help stuff */
3737
if (splitwind(FALSE, 1) == FALSE)
38-
return (FALSE);
38+
return FALSE;
3939

4040
if (bp == NULL) {
4141
/* and read the stuff in */
4242
if (getfile(fname, FALSE) == FALSE)
43-
return (FALSE);
43+
return FALSE;
4444
} else
4545
swbuffer(bp);
4646

@@ -52,7 +52,7 @@ int help(int f, int n)
5252
wp->w_flag |= WFMODE;
5353
wp = wp->w_wndp;
5454
}
55-
return (TRUE);
55+
return TRUE;
5656
}
5757

5858
int deskey(int f, int n)
@@ -78,7 +78,7 @@ int deskey(int f, int n)
7878

7979
/* output the command sequence */
8080
ostring(ptr);
81-
return (TRUE);
81+
return TRUE;
8282
}
8383

8484
/*
@@ -102,7 +102,7 @@ int bindtokey(int f, int n)
102102
kfunc = getname();
103103
if (kfunc == NULL) {
104104
mlwrite("(No such function)");
105-
return (FALSE);
105+
return FALSE;
106106
}
107107
ostring(" ");
108108

@@ -157,7 +157,7 @@ int bindtokey(int f, int n)
157157
/* if we run out of binding room, bitch */
158158
if (ktp >= &keytab[NBINDS]) {
159159
mlwrite("Binding table FULL!");
160-
return (FALSE);
160+
return FALSE;
161161
}
162162

163163
ktp->k_code = c; /* add keycode */
@@ -166,7 +166,7 @@ int bindtokey(int f, int n)
166166
ktp->k_code = 0;
167167
ktp->k_fp = NULL;
168168
}
169-
return (TRUE);
169+
return TRUE;
170170
}
171171

172172
/*
@@ -195,9 +195,9 @@ int unbindkey(int f, int n)
195195
/* if it isn't bound, bitch */
196196
if (unbindchar(c) == FALSE) {
197197
mlwrite("(Key not bound)");
198-
return (FALSE);
198+
return FALSE;
199199
}
200-
return (TRUE);
200+
return TRUE;
201201
}
202202

203203

@@ -225,7 +225,7 @@ int unbindchar(int c)
225225

226226
/* if it isn't bound, bitch */
227227
if (!found)
228-
return (FALSE);
228+
return FALSE;
229229

230230
/* save the pointer and scan to the end of the table */
231231
sktp = ktp;
@@ -240,7 +240,7 @@ int unbindchar(int c)
240240
/* null out the last one */
241241
ktp->k_code = 0;
242242
ktp->k_fp = NULL;
243-
return (TRUE);
243+
return TRUE;
244244
}
245245

246246
/* describe bindings
@@ -251,7 +251,7 @@ int desbind(int f, int n)
251251
#if APROP
252252
{
253253
buildlist(TRUE, "");
254-
return (TRUE);
254+
return TRUE;
255255
}
256256

257257
int apro(int f, int n)
@@ -261,9 +261,9 @@ int apro(int f, int n)
261261

262262
status = mlreply("Apropos string: ", mstring, NSTRING - 1);
263263
if (status != TRUE)
264-
return (status);
264+
return status;
265265

266-
return (buildlist(FALSE, mstring));
266+
return buildlist(FALSE, mstring);
267267
}
268268

269269
/*
@@ -284,13 +284,13 @@ int buildlist(int type, char *mstring)
284284

285285
/* split the current window to make room for the binding list */
286286
if (splitwind(FALSE, 1) == FALSE)
287-
return (FALSE);
287+
return FALSE;
288288

289289
/* and get a buffer for it */
290290
bp = bfind("*Binding list*", TRUE, 0);
291291
if (bp == NULL || bclear(bp) == FALSE) {
292292
mlwrite("Can not display binding list");
293-
return (FALSE);
293+
return FALSE;
294294
}
295295

296296
/* let us know this is in progress */
@@ -346,7 +346,7 @@ int buildlist(int type, char *mstring)
346346

347347
/* and add it as a line into the buffer */
348348
if (linstr(outseq) != TRUE)
349-
return (FALSE);
349+
return FALSE;
350350

351351
cpos = 0; /* and clear the line */
352352
}
@@ -358,7 +358,7 @@ int buildlist(int type, char *mstring)
358358
outseq[cpos++] = '\n';
359359
outseq[cpos] = 0;
360360
if (linstr(outseq) != TRUE)
361-
return (FALSE);
361+
return FALSE;
362362
}
363363

364364
fail: /* and on to the next name */
@@ -375,7 +375,7 @@ int buildlist(int type, char *mstring)
375375
wp = wp->w_wndp;
376376
}
377377
mlwrite(""); /* clear the mode line */
378-
return (TRUE);
378+
return TRUE;
379379
}
380380

381381
#if APROP
@@ -408,12 +408,12 @@ int strinc(char *source, char *sub)
408408

409409
/* yes, return a success */
410410
if (*tp == 0)
411-
return (TRUE);
411+
return TRUE;
412412

413413
/* no, onward */
414414
sp++;
415415
}
416-
return (FALSE);
416+
return FALSE;
417417
}
418418
#endif
419419

@@ -430,15 +430,15 @@ unsigned int getckey(int mflag)
430430
/* check to see if we are executing a command line */
431431
if (clexec) {
432432
macarg(tok); /* get the next token */
433-
return (stock(tok));
433+
return stock(tok);
434434
}
435435

436436
/* or the normal way */
437437
if (mflag)
438438
c = get1key();
439439
else
440440
c = getcmd();
441-
return (c);
441+
return c;
442442
}
443443

444444
/*
@@ -458,10 +458,10 @@ int startup(char *sfname)
458458

459459
/* if it isn't around, don't sweat it */
460460
if (fname == NULL)
461-
return (TRUE);
461+
return TRUE;
462462

463463
/* otherwise, execute the sucker */
464-
return (dofile(fname));
464+
return dofile(fname);
465465
}
466466

467467
/*
@@ -493,7 +493,7 @@ char *flook(char *fname, int hflag)
493493
/* and try it out */
494494
if (ffropen(fspec) == FIOSUC) {
495495
ffclose();
496-
return (fspec);
496+
return fspec;
497497
}
498498
}
499499
}
@@ -502,7 +502,7 @@ char *flook(char *fname, int hflag)
502502
/* always try the current directory first */
503503
if (ffropen(fname) == FIOSUC) {
504504
ffclose();
505-
return (fname);
505+
return fname;
506506
}
507507
#if ENVFUNC
508508
/* get the PATH variable */
@@ -524,7 +524,7 @@ char *flook(char *fname, int hflag)
524524
/* and try it out */
525525
if (ffropen(fspec) == FIOSUC) {
526526
ffclose();
527-
return (fspec);
527+
return fspec;
528528
}
529529

530530
if (*path == PATHCHR)
@@ -540,11 +540,11 @@ char *flook(char *fname, int hflag)
540540
/* and try it out */
541541
if (ffropen(fspec) == FIOSUC) {
542542
ffclose();
543-
return (fspec);
543+
return fspec;
544544
}
545545
}
546546

547-
return (NULL); /* no such luck */
547+
return NULL; /* no such luck */
548548
}
549549

550550
/*
@@ -601,12 +601,12 @@ int (*getbind(int c))(int, int)
601601
ktp = &keytab[0]; /* Look in key table. */
602602
while (ktp->k_fp != NULL) {
603603
if (ktp->k_code == c)
604-
return (ktp->k_fp);
604+
return ktp->k_fp;
605605
++ktp;
606606
}
607607

608608
/* no such binding */
609-
return (NULL);
609+
return NULL;
610610
}
611611

612612
/*
@@ -622,10 +622,10 @@ char *getfname(fn_t func)
622622
nptr = &names[0];
623623
while (nptr->n_func != NULL) {
624624
if (nptr->n_func == func)
625-
return (nptr->n_name);
625+
return nptr->n_name;
626626
++nptr;
627627
}
628-
return (NULL);
628+
return NULL;
629629
}
630630

631631
/*
@@ -642,10 +642,10 @@ int (*fncmatch(char *fname)) (int, int)
642642
ffp = &names[0];
643643
while (ffp->n_func != NULL) {
644644
if (strcmp(fname, ffp->n_name) == 0)
645-
return (ffp->n_func);
645+
return ffp->n_func;
646646
++ffp;
647647
}
648-
return (NULL);
648+
return NULL;
649649
}
650650

651651
/*
@@ -696,7 +696,7 @@ unsigned int stock(char *keyname)
696696

697697
/* the final sequence... */
698698
c |= *keyname;
699-
return (c);
699+
return c;
700700
}
701701

702702
/*
@@ -712,5 +712,5 @@ char *transbind(char *skey)
712712
if (bindname == NULL)
713713
bindname = "ERROR";
714714

715-
return (bindname);
715+
return bindname;
716716
}

0 commit comments

Comments
 (0)