From: Andy G. <ag...@us...> - 2002-11-20 03:05:52
|
Update of /cvsroot/acpi/ospmd/ospmd/libpower In directory sc8-pr-cvs1:/tmp/cvs-serv5372/ospmd/libpower Modified Files: libpower.cpp Log Message: tidying up a little Index: libpower.cpp =================================================================== RCS file: /cvsroot/acpi/ospmd/ospmd/libpower/libpower.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- libpower.cpp 9 Oct 2002 20:53:45 -0000 1.4 +++ libpower.cpp 20 Nov 2002 03:05:50 -0000 1.5 @@ -266,13 +266,12 @@ return -1; } - if (hdr.data_len == -1) + if (hdr.data_len < 0) { PWR_ERROR("Server request failed - nothing returned\n"); return -1; } - - if (hdr.data_len != msg_type[hdr.req_type].datalen_from_server) + else if (hdr.data_len != msg_type[hdr.req_type].datalen_from_server) { PWR_ERROR("Server returned wrong amount of data - expecting %d got %d\n", msg_type[hdr.req_type].datalen_from_server, hdr.data_len); |