/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugins.d/mandos-client.c

  • Committer: Teddy Hogeborn
  • Date: 2009-01-12 22:02:33 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090112220233-lawxo4uvyzb38u1f
* README (The Plugin System): Removed redundant text about options and
                              files for the plugins, this is now
                              documented in the manuals for the
                              plugins.

* plugins.d/mandos-client.c (main): Remove comment which was copied
                                    from another program by mistake.
                                    Use "sscanf" instead of "strtol"
                                    to parse numbers; this uses the
                                    correct type instead of casting.
                                    Don't report errors when removing
                                    temporary directory if directory
                                    is already gone.

Show diffs side-by-side

added added

removed removed

Lines of Context:
884
884
          break;
885
885
        case 129:               /* --dh-bits */
886
886
          ret = sscanf(arg, "%u", &mc.dh_bits);
887
 
          if(ret != 1){
 
887
          if(ret == 0 or mc.dh_bits == 0){
888
888
            fprintf(stderr, "Bad number of DH bits\n");
889
889
            exit(EXIT_FAILURE);
890
890
          }
997
997
      }
998
998
      uint16_t port;
999
999
      ret = sscanf(address+1, "%" SCNu16, &port);
1000
 
      if(ret != 1){
 
1000
      if(ret == 0 or port == 0){
1001
1001
        fprintf(stderr, "Bad port number\n");
1002
1002
        exitcode = EXIT_FAILURE;
1003
1003
        goto end;