aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/date.c2
-rw-r--r--coreutils/uudecode.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/coreutils/date.c b/coreutils/date.c
index 767e0d4a2..7965775fe 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -373,7 +373,7 @@ int date_main(int argc UNUSED_PARAM, char **argv)
date_buf[0] = '\0';
} else {
/* Handle special conversions */
- if (strncmp(fmt_dt2str, "%f", 2) == 0) {
+ if (is_prefixed_with(fmt_dt2str, "%f")) {
fmt_dt2str = (char*)"%Y.%m.%d-%H:%M:%S";
}
/* Generate output string */
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c
index b298fcb95..3f1227306 100644
--- a/coreutils/uudecode.c
+++ b/coreutils/uudecode.c
@@ -110,10 +110,10 @@ int uudecode_main(int argc UNUSED_PARAM, char **argv)
FILE *dst_stream;
int mode;
- if (strncmp(line, "begin-base64 ", 13) == 0) {
+ if (is_prefixed_with(line, "begin-base64 ")) {
line_ptr = line + 13;
decode_fn_ptr = read_base64;
- } else if (strncmp(line, "begin ", 6) == 0) {
+ } else if (is_prefixed_with(line, "begin ")) {
line_ptr = line + 6;
decode_fn_ptr = read_stduu;
} else {