Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 312967
Collapse All | Expand All

(-)pigz-2.1.6.orig//pigz.c (+9 lines)
Lines 2914-2919 local size_t num(char *arg) Link Here
2914
local int option(char *arg)
2914
local int option(char *arg)
2915
{
2915
{
2916
    static int get = 0;     /* if not zero, look for option parameter */
2916
    static int get = 0;     /* if not zero, look for option parameter */
2917
    static char ddash = 0;  /* if not zero, we got '--' and option parsing should stop */
2917
    char bad[3] = "-X";     /* for error messages (X is replaced) */
2918
    char bad[3] = "-X";     /* for error messages (X is replaced) */
2918
2919
2919
    /* if no argument or dash option, check status of get */
2920
    /* if no argument or dash option, check status of get */
Lines 2923-2928 local int option(char *arg) Link Here
2923
    }
2924
    }
2924
    if (arg == NULL)
2925
    if (arg == NULL)
2925
        return 0;
2926
        return 0;
2927
    if (ddash)
2928
        return 1;
2926
2929
2927
    /* process long option or short options */
2930
    /* process long option or short options */
2928
    if (*arg == '-') {
2931
    if (*arg == '-') {
Lines 2935-2940 local int option(char *arg) Link Here
2935
            int j;
2938
            int j;
2936
2939
2937
            arg++;
2940
            arg++;
2941
            /* stop parsing options after '--' */
2942
            if (*arg == 0) {
2943
                ddash++;
2944
                return 0;
2945
            }
2946
2938
            for (j = NLOPTS - 1; j >= 0; j--)
2947
            for (j = NLOPTS - 1; j >= 0; j--)
2939
                if (strcmp(arg, longopts[j][0]) == 0) {
2948
                if (strcmp(arg, longopts[j][0]) == 0) {
2940
                    arg = longopts[j][1];
2949
                    arg = longopts[j][1];

Return to bug 312967