From 53423af856236bdb7abbd04ec6db8ae66750378d Mon Sep 17 00:00:00 2001 From: samm2 <samm2@4ea69e1a-61f1-4043-bf83-b5c94c648137> Date: Fri, 9 Oct 2009 12:06:58 +0000 Subject: [PATCH] os_freebsd.cpp: tiny change that fixes one logical error and couple of style deviations git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2953 4ea69e1a-61f1-4043-bf83-b5c94c648137 --- smartmontools/os_freebsd.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/smartmontools/os_freebsd.cpp b/smartmontools/os_freebsd.cpp index 88ecedd0f..b6e3b8047 100644 --- a/smartmontools/os_freebsd.cpp +++ b/smartmontools/os_freebsd.cpp @@ -227,9 +227,9 @@ bool freebsd_smart_device::close() { int failed = 0; // close device, if open - if (get_fd()) + if (is_open()) failed=::close(get_fd()); - + set_fd(-1); if(failed) return false; @@ -252,7 +252,7 @@ public: protected: virtual int ata_command_interface(smart_command_set command, int select, char * data); - virtual int do_cmd(struct ata_ioc_request* request); + virtual int do_cmd(struct ata_ioc_request* request); }; freebsd_ata_device::freebsd_ata_device(smart_interface * intf, const char * dev_name, const char * req_type) @@ -282,7 +282,7 @@ protected: int m_fd; struct cam_device *m_camdev; - virtual int do_cmd( struct ata_ioc_request* request); + virtual int do_cmd( struct ata_ioc_request* request); }; bool freebsd_atacam_device::open(){ -- GitLab