10-fix-errno.patch 699 B

123456789101112131415161718192021222324
  1. --- afpfs-ng-0.8.1/lib/afp.c 2011-09-04 19:42:42.000000000 +0200
  2. +++ afpfs-ng-0.8.1/lib/afp.c 2011-09-04 19:39:44.000000000 +0200
  3. @@ -19,7 +19,6 @@
  4. #include <sys/time.h>
  5. #include <sys/types.h>
  6. #include <sys/socket.h>
  7. -#include <errno.h>
  8. #include <afpfs-ng/afp_protocol.h>
  9. #include <afpfs-ng/libafpclient.h>
  10. --- afpfs-ng-0.8.1/lib/afp_url.c 2011-09-04 19:42:42.000000000 +0200
  11. +++ afpfs-ng-0.8.1/lib/afp_url.c 2011-09-04 19:40:27.000000000 +0200
  12. @@ -21,7 +21,9 @@
  13. static int check_port(char * port)
  14. {
  15. - long long ret = strtol(port,NULL,10);
  16. + long long ret = 0;
  17. + errno = 0;
  18. + ret = strtol(port,NULL,10);
  19. if ((ret<0) || (ret>32767)) return -1;
  20. if (errno) {
  21. printf("port error\n");