Browse Source

Remove unnecessary negation

master
Bandie 3 years ago
parent
commit
896b4400da
Signed by: Bandie GPG Key ID: C1E133BC65A822DD
1 changed files with 9 additions and 7 deletions
  1. +9
    -7
      src/grub2-se-verifyserv.c

+ 9
- 7
src/grub2-se-verifyserv.c View File

@ -71,13 +71,7 @@ int main(int argc, char *argv[]){
if(fork() == 0){
// Check if program is even executable
if(!(!access(PROGRAM, F_OK) && !access(PROGRAM, R_OK) && !access(PROGRAM, X_OK))){
fprintf(stderr, "ERROR: It is not possible to execute %s: ", PROGRAM);
if(access(PROGRAM, F_OK)) fprintf(stderr, "It does not exist.\n");
else fprintf(stderr, "Access denied. (Are you root?)\n");
return 1;
}
else{
if(!access(PROGRAM, F_OK) && !access(PROGRAM, R_OK) && !access(PROGRAM, X_OK)){
// Exec program silently by default
if(!verbose){
@ -90,6 +84,14 @@ int main(int argc, char *argv[]){
}
else
execlp(PROGRAM, PROGRAM, NULL);
}
else{
fprintf(stderr, "ERROR: It is not possible to execute %s: ", PROGRAM);
if(access(PROGRAM, F_OK)) fprintf(stderr, "It does not exist.\n");
else fprintf(stderr, "Access denied. (Are you root?)\n");
return 1;
}
}


Loading…
Cancel
Save