small fixes. ENGINE-427
authorKrista Bennett <krista@pep-project.org>
Mon, 11 Jun 2018 17:01:53 +0200
branchENGINE-427
changeset 27456a9496277bd6
parent 2744 df7e5d64011f
child 2761 5c59b5869d54
small fixes.
src/pgp_gpg.c
     1.1 --- a/src/pgp_gpg.c	Mon Jun 11 16:06:18 2018 +0200
     1.2 +++ b/src/pgp_gpg.c	Mon Jun 11 17:01:53 2018 +0200
     1.3 @@ -34,7 +34,7 @@
     1.4  
     1.5      FILE *f = Fopen(config_file_path, "r");    
     1.6         
     1.7 -    if (f == NULL && errno == ENOMEM)
     1.8 +    if (f == NULL)
     1.9          return false;
    1.10  
    1.11      int i;
    1.12 @@ -45,7 +45,7 @@
    1.13      char* s = NULL;
    1.14  
    1.15      // Go through every line in the file
    1.16 -    while ((s = fgets(buf, MAX_LINELENGTH, f))) {
    1.17 +    while ((s = Fgets(buf, MAX_LINELENGTH, f))) {
    1.18          // pointers to the keys found in this string
    1.19          str_ptr_and_bit* found_keys = (str_ptr_and_bit*)(calloc(num_keys, sizeof(str_ptr_and_bit)));
    1.20          int num_found_keys = 0;
    1.21 @@ -527,7 +527,6 @@
    1.22          gpgme = dlopen(LIBGPGME, RTLD_LAZY);
    1.23          if (gpgme == NULL) {
    1.24              // FIXME: Hotfix here?
    1.25 -            
    1.26              status = PEP_INIT_CANNOT_LOAD_GPGME;
    1.27              goto pep_error;
    1.28          }