Skip to contentSkip to conversation

tools: hv: fcopy: set 'error' in case an unknown operation was requested

PATCH New Vitaly Kuznetsov 1 participant 1 message Sep 4, 2018 Hyper-V/Azure core and drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: hv: fcopy: set 'error' in case an unknown operation was requested

'error' variable is left uninitialized in case we see an unknown operation. As we don't immediately return and proceed to pwrite() we need to set it to something, HV_E_FAIL sounds good enough.

---
 tools/hv/hv_fcopy_daemon.c | 1 +
 1 file changed, 1 insertion(+)
tools/hv/hv_fcopy_daemon.c +1 -0
index d78aed86af09..8ff8cb1a11f4 100644
@@ -234,6 +234,7 @@ int main(int argc, char *argv[])
 			break;
 
 		default:
+			error = HV_E_FAIL;
 			syslog(LOG_ERR, "Unknown operation: %d",
 				buffer.hdr.operation);
 
Signature · 1 line
2.14.4