char tmp[20] = {0};
snprintf(tmp, sizeof(tmp), "\"TP%02d%c\":\"%d\"",
data[i], loc[j], ts->pressure_data[data[i]][j]);
- strncat(buff, tmp, sizeof(tmp));
+ strlcat(buff, tmp, sizeof(buff));
if (i < 3 || j < PRESSURE_CHANNEL_NUM - 1)
strncat(buff, ",", 2);
}
snprintf(buff, sizeof(buff),
"%d: %04x%04x%04x%04x\n",
string_addr, data0, data1, data2, data3);
- strncat(buf, buff, sizeof(buff));
+ strlcat(buf, buff, sizeof(buf));
}
}
#endif
}
- if (!ts->power_status == SEC_TS_STATE_POWER_OFF && ts->reinit_done) {
+ if (!(ts->power_status == SEC_TS_STATE_POWER_OFF) && ts->reinit_done) {
if (ts->flip_enable)
sec_ts_set_cover_type(ts, true);
else
}
sprintf(timestamp, "TIMESTAMP=%lu", ktime_ms);
uevent_str[idx++] = ×tamp[0];
- uevent_str[idx] = '\0';
+ uevent_str[idx] = (char *)'\0';
strlcpy(event_type, uevent_str[1] + 6, sizeof(event_type));
ABC_PRINT("event type : %s\n", event_type);