k9core

Coreutils for *nix operating systems (fork)
git clone git://bvnf.space/k9core.git
Log | Files | Refs | LICENSE

commit b263799cbb3c7e3b52dd8d503e8259cfe1f15d29
parent 87c139e37733822176db7269587c4f57b22b75d1
Author: call-cc <callcc@vxempire.xyz>
Date:   Fri, 19 Jun 2020 16:46:24 -0400

Fix to remove error in -Wall -Wextra

Diffstat:
Msrc/ln.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/ln.c b/src/ln.c @@ -13,12 +13,11 @@ main(int argc, char *argv[]) int opts, fd, fflag; while((opts = getopt(argc, argv, "sf")) != -1) { + if(opts == 'f') fflag=1; switch(opts) { - case 'f': - fflag=1; case 's': - if(fflag && (access(argv[3], F_OK) != 1)) { + if(fflag == 1 && (access(argv[3], F_OK) != 1)) { if(remove(argv[3]) == -1) rmdir(argv[3]); }