diff options
author | Jan Psota <jasiupsota@gmail.com> | 2010-10-11 17:27:06 +0200 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2010-10-11 17:27:29 +0200 |
commit | 21572bb7c3ff212aaeb005e98af3b8c347af0da1 (patch) | |
tree | 11d473012a4a2a2ddd0f323046d289de346f7a06 | |
parent | Fix compilation with --as-needed (bug 246914) (diff) | |
download | conf-update-21572bb7c3ff212aaeb005e98af3b8c347af0da1.tar.gz conf-update-21572bb7c3ff212aaeb005e98af3b8c347af0da1.tar.bz2 conf-update-21572bb7c3ff212aaeb005e98af3b8c347af0da1.zip |
Fix regex for grep 2.7 and later (bug #338414)
-rw-r--r-- | conf-update.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/conf-update.c b/conf-update.c index f987501..8afbe0f 100644 --- a/conf-update.c +++ b/conf-update.c @@ -133,12 +133,12 @@ int main(int argc, char **argv) { esc_myfile = g_shell_quote(myfile); highest = get_highest_update(protected, protected[i]); esc_highest = g_shell_quote(highest); - cmd = (char *)calloc(strlen("diff -Nu % % | grep \"^[+-][^+-]\" | grep -v \"^[-+]#\" | grep -v \"^[-+][:space:]*$\" " ) + strlen(esc_highest) + strlen(esc_myfile), sizeof(char)); + cmd = (char *)calloc(strlen("diff -Nu % % | grep \"^[+-][^+-]\" | grep -v \"^[-+]#\" | grep -v \"^[-+][[:space:]]*$\" " ) + strlen(esc_highest) + strlen(esc_myfile), sizeof(char)); strcpy(cmd, "diff -Nu "); strcat(cmd, esc_myfile); strcat(cmd, " "); strcat(cmd, esc_highest); - strcat(cmd, " | grep \"^[+-][^+-]\" | grep -v \"^[-+]#\" | grep -v \"^[-+][:space:]*$\""); + strcat(cmd, " | grep \"^[+-][^+-]\" | grep -v \"^[-+]#\" | grep -v \"^[-+][[:space:]]*$\""); free(myfile); free(esc_myfile); |