sdm: Pass character pointer with NULL terminated string.

Pass character pointer with NULL terminated string to avoid undefined
behavior while logging

Change-Id: I77df09dc185b8aad07a68a564973231e479af76c
CRs-Fixed: 1110993
diff --git a/sdm/libs/core/fb/hw_device.cpp b/sdm/libs/core/fb/hw_device.cpp
index 111e386..b5233ae 100644
--- a/sdm/libs/core/fb/hw_device.cpp
+++ b/sdm/libs/core/fb/hw_device.cpp
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2014 - 2016, The Linux Foundation. All rights reserved.
+* Copyright (c) 2014 - 2017, The Linux Foundation. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
@@ -1041,7 +1041,7 @@
 
 bool HWDevice::EnableHotPlugDetection(int enable) {
   char hpdpath[kMaxStringLength];
-  char value = enable ? '1' : '0';
+  const char *value = enable ? "1" : "0";
 
   // Enable HPD for all pluggable devices.
   for (int i = 0; i < kFBNodeMax; i++) {
@@ -1050,7 +1050,7 @@
     if (panel_info.is_pluggable == true) {
       snprintf(hpdpath , sizeof(hpdpath), "%s%d/hpd", fb_path_, i);
 
-      ssize_t length = SysFsWrite(hpdpath, &value, sizeof(value));
+      ssize_t length = SysFsWrite(hpdpath, value, 1);
       if (length <= 0) {
         return false;
       }