diff options
author | Jim Meyering <meyering@redhat.com> | 2011-03-31 17:59:16 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-04-03 21:55:27 +0200 |
commit | 03583f8d646f4cc4d5f91b7ed763c147a00e2f44 (patch) | |
tree | e75e865b606e1fd762b53fa0d1240f619a4338a4 /src/md5sum.c | |
parent | 1c3654cb1fb0d8f3c422c766028d0783a40f4a42 (diff) | |
download | coreutils-03583f8d646f4cc4d5f91b7ed763c147a00e2f44.tar.xz |
maint: prohibit direct use of strncmp: prefer STREQ_LEN, STRNCMP_LIT
* cfg.mk (sc_prohibit_strncmp): New rule, mostly from libvirt.
* src/system.h (STREQ_LEN, STRPREFIX, STRNCMP_LIT): Define.
* src/df.c (get_dev, get_point): Convert.
* src/extent-scan.c (extent_need_sync): Likewise.
* src/ls.c (is_colored, decode_switches): Likewise.
(parse_ls_color, (print_color_indicator): Likewise.
* src/md5sum.c (split_3): Likewise.
* src/split.c (main, emit_ancillary_info): Likewise.
* src/tr.c (look_up_char_class): Likewise.
* src/uname.c (main): Likewise.
* src/who.c (scan_entries): Likewise.
Diffstat (limited to 'src/md5sum.c')
-rw-r--r-- | src/md5sum.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/md5sum.c b/src/md5sum.c index 697689b3b..6f6e6373d 100644 --- a/src/md5sum.c +++ b/src/md5sum.c @@ -262,7 +262,7 @@ split_3 (char *s, size_t s_len, /* Check for BSD-style checksum line. */ algo_name_len = strlen (DIGEST_TYPE_STRING); - if (strncmp (s + i, DIGEST_TYPE_STRING, algo_name_len) == 0) + if (STREQ_LEN (s + i, DIGEST_TYPE_STRING, algo_name_len)) { if (s[i + algo_name_len] == ' ') ++i; |