From 6ad80326dd46f2e557367f7845f91ed1949a07e9 Mon Sep 17 00:00:00 2001
From: Guo Wenxue <guowenxue@gmail.com>
Date: Sun, 21 Oct 2018 10:20:24 +0800
Subject: [PATCH] update ds18b20.c source code, add break when find ds18b20
---
modules/c/ds18b20.c | 1 +
apue/1.File_IO/ds18b20.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/apue/1.File_IO/ds18b20.c b/apue/1.File_IO/ds18b20.c
index d170de1..447bf28 100644
--- a/apue/1.File_IO/ds18b20.c
+++ b/apue/1.File_IO/ds18b20.c
@@ -76,6 +76,7 @@
/* find and get the chipset SN filename */
strcpy(chip,direntp->d_name);
found = 1;
+ break;
}
}
closedir(dirp);
diff --git a/modules/c/ds18b20.c b/modules/c/ds18b20.c
index d170de1..447bf28 100644
--- a/modules/c/ds18b20.c
+++ b/modules/c/ds18b20.c
@@ -76,6 +76,7 @@
/* find and get the chipset SN filename */
strcpy(chip,direntp->d_name);
found = 1;
+ break;
}
}
closedir(dirp);
--
Gitblit v1.9.1