X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=dotlock.c;h=43d30582507b0f61b85527742a14d221d429d6ae;hp=e08a4674bd74c9b5fa7bbac3a2dd3f0053613379;hb=eed5352e46df93f8921d2e6dfdc95b027bad6e1e;hpb=a8477ebaa09990b3688164cbe5cf661c4189541d diff --git a/dotlock.c b/dotlock.c index e08a467..43d3058 100644 --- a/dotlock.c +++ b/dotlock.c @@ -126,7 +126,7 @@ static int dotlock_lock (const char *); #define check_flags(a) if (a & DL_FL_ACTIONS) usage (argv[0]) -size_t str_len (const char* s) { +size_t m_strlen(const char* s) { return (s ? strlen (s) : 0); } @@ -453,7 +453,7 @@ static int dotlock_prepare (char *bn, size_t l, const char *f, int _fd) dirname = "."; } - if (str_len (basename) + 1 > l) + if (m_strlen(basename) + 1 > l) return -1; strfcpy (bn, basename, l);