diff options
author | Ned Ludd <solar@gentoo.org> | 2007-04-06 20:50:19 +0000 |
---|---|---|
committer | Ned Ludd <solar@gentoo.org> | 2007-04-06 20:50:19 +0000 |
commit | 757aa82d7cfb35e3bf2917eabfe4be32243ae659 (patch) | |
tree | b3decb556a31dd10cabebadc8a70e0109291488c /qfile.c | |
parent | - update qgrep man page (diff) | |
download | portage-utils-757aa82d7cfb35e3bf2917eabfe4be32243ae659.tar.gz portage-utils-757aa82d7cfb35e3bf2917eabfe4be32243ae659.tar.bz2 portage-utils-757aa82d7cfb35e3bf2917eabfe4be32243ae659.zip |
- Bug #173527 - -Os compile time warnings
Diffstat (limited to 'qfile.c')
-rw-r--r-- | qfile.c | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -1,7 +1,7 @@ /* * Copyright 2005-2006 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-projects/portage-utils/qfile.c,v 1.42 2007/01/13 19:17:39 solar Exp $ + * $Header: /var/cvsroot/gentoo-projects/portage-utils/qfile.c,v 1.43 2007/04/06 20:50:19 solar Exp $ * * Copyright 2005-2006 Ned Ludd - <solar@gentoo.org> * Copyright 2005-2006 Mike Frysinger - <vapier@gentoo.org> @@ -32,16 +32,14 @@ static const char *qfile_opts_help[] = { "Don't look in package <arg>", COMMON_OPTS_HELP }; -static char qfile_rcsid[] = "$Id: qfile.c,v 1.42 2007/01/13 19:17:39 solar Exp $"; +static char qfile_rcsid[] = "$Id: qfile.c,v 1.43 2007/04/06 20:50:19 solar Exp $"; #define qfile_usage(ret) usage(ret, QFILE_FLAGS, qfile_long_opts, qfile_opts_help, lookup_applet_idx("qfile")) -static inline short qfile_is_prefix(const char* path, const char* prefix, int prefix_length) -{ - return !prefix_length - || (strlen(path) >= prefix_length - && (path[prefix_length] == '/' || path[prefix_length] == '\0') - && !strncmp(path, prefix, prefix_length)); -} +#define qfile_is_prefix(path, prefix, prefix_length) \ + (!prefix_length \ + || (strlen(path) >= prefix_length \ + && (path[prefix_length] == '/' || path[prefix_length] == '\0') \ + && !strncmp(path, prefix, prefix_length))) typedef struct { int length; |