diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2007-01-21 17:10:14 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2007-01-21 17:10:14 +0100 |
commit | a0e2a994b8bd3b35e2916b124e7c672ce4dd608c (patch) | |
tree | f0620793052ed0e71ba1d96b7977269fb95e601f /inotail.c | |
parent | 11c4e61b49640d5d5ac95e0b52f8139ac40b59c6 (diff) |
inotail.c: Use strcmp rather than strncmp
We're compare against a constant string
Diffstat (limited to 'inotail.c')
-rw-r--r-- | inotail.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -95,7 +95,7 @@ static inline void ignore_file(struct file_struct *f) static inline char *pretty_name(char *filename) { - return (strncmp(filename, "-", 1) == 0) ? "standard input" : filename; + return (strcmp(filename, "-") == 0) ? "standard input" : filename; } static void write_header(char *filename) @@ -222,7 +222,7 @@ static int tail_file(struct file_struct *f, unsigned int n_units, char mode, cha char buf[BUFFER_SIZE]; struct stat finfo; - if (strncmp(f->name, "-", 1) == 0) + if (strcmp(f->name, "-") == 0) f->fd = STDIN_FILENO; else { f->fd = open(f->name, O_RDONLY); |