[PATCH setxkbmap 1/2] Removed unused arg subdir in function findFileInPath()

Peter Hutterer peter.hutterer at who-t.net
Thu Feb 24 20:14:46 PST 2011


On Tue, Feb 22, 2011 at 10:18:56AM +0500, Alexandr Shadchin wrote:
> Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin at gmail.com>
> ---
>  setxkbmap.c |   12 ++++++------
>  1 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/setxkbmap.c b/setxkbmap.c
> index 0c43be5..1c9c89e 100644
> --- a/setxkbmap.c
> +++ b/setxkbmap.c
> @@ -178,7 +178,7 @@ Bool setOptString(int *arg, int argc, char **argv, setting_t * setting, int src)
>  int parseArgs(int argc, char **argv);
>  Bool getDisplay(int argc, char **argv);
>  Bool getServerValues(void);
> -FILE *findFileInPath(char *name, char *subdir);
> +FILE *findFileInPath(char *name);
>  Bool addStringToOptions(char *opt_str, list_t * opts);
>  char *stringFromOptions(char *orig, list_t * newOpts);
>  Bool applyConfig(char *name);
> @@ -622,7 +622,7 @@ getServerValues(void)
>  /***====================================================================***/
>  
>  FILE *
> -findFileInPath(char *name, char *subdir)
> +findFileInPath(char *name)
>  {
>      register int i;
>      char buf[PATH_MAX];
> @@ -637,11 +637,11 @@ findFileInPath(char *name, char *subdir)
>      }
>      for (i = 0; (i < inclPath.num); i++)
>      {
> -        if (snprintf(buf, PATH_MAX, "%s/%s%s", inclPath.item[i], subdir, name) >=
> +        if (snprintf(buf, PATH_MAX, "%s/%s", inclPath.item[i], name) >=
>              PATH_MAX)
>          {
> -            VMSG3(0, "Path too long (%s/%s%s). Ignored.\n", inclPath.item[i],
> -                  subdir, name);
> +            VMSG2(0, "Path too long (%s/%s). Ignored.\n", inclPath.item[i],
> +                  name);
>              continue;
>          }
>          fp = fopen(buf, "r");
> @@ -739,7 +739,7 @@ applyConfig(char *name)
>      FILE *fp;
>      Bool ok;
>  
> -    if ((fp = findFileInPath(name, "")) == NULL)
> +    if ((fp = findFileInPath(name)) == NULL)
>          return False;
>      ok = XkbCFParse(fp, XkbCFDflts, NULL, &cfgResult);
>      fclose(fp);
> -- 
> 1.7.3.5

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

sorry, I've gotten your patches mixed up and can't seem to find the right
order so they apply without conflicts. Can you send me a new series based
on current master please? (private email will do)
or a git repo to pull from will do as well.  thanks.

Cheers,
  Peter


More information about the xorg-devel mailing list