projects
/
platform
/
hal
/
backend
/
tw3
/
device-tw3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7444272
)
Delete duplicate code
author
Youngjae Cho
<y0.cho@samsung.com>
Thu, 1 Aug 2019 08:02:34 +0000
(17:02 +0900)
committer
Youngjae Cho
<y0.cho@samsung.com>
Thu, 1 Aug 2019 08:03:06 +0000
(17:03 +0900)
Change-Id: I1d97f95b9f0256e01ec24c3c1c68323931d8a46b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
hw/board/board.c
patch
|
blob
|
history
diff --git
a/hw/board/board.c
b/hw/board/board.c
index
9cac809
..
d8bb35a
100644
(file)
--- a/
hw/board/board.c
+++ b/
hw/board/board.c
@@
-46,7
+46,6
@@
static int get_serialno_from_dat(void)
{
FILE *fp;
char buffer[DATA_BUFF_MAX], *p, *q;
- int serial_len;
fp = fopen(SERIAL_PATH_NAME, "r");
if (!fp) {
@@
-63,7
+62,6
@@
static int get_serialno_from_dat(void)
q = strchrnul(p, '\n');
*q = '\0';
- serial_len = strlen(p);
strcpy(info.serial, p);
info.serial_len = strlen(p);
@@
-75,7
+73,6
@@
static int get_serialno_from_cpuinfo(void)
{
FILE *fp;
char line[LINE_LEN], *p, *q;
- int serial_len;
fp = fopen(CPUINFO_PATH, "r");
if (!fp) {
@@
-100,8
+97,7
@@
static int get_serialno_from_cpuinfo(void)
q = strchrnul(p, '\n');
*q = '\0';
- serial_len = strlen(p);
- strncpy(info.serial, p, serial_len + 1);
+ strcpy(info.serial, p);
info.serial_len = strlen(p);
fclose(fp);