Update pattern.c

much more simple...