sorry Emilio, I really don't agree with your code.
the approach (even if at the end is the same) is a little bit tricky.
what about 
if(!GBL_OPTIONS->target1)  GBL_OPTIONS->target1 = strdup("///");
if (!strncmp(GBL_OPTIONS->target1, "///", 3)
       GBL_TARGET1->scan_all = 1;

so basically just remove the "else" statement.

same applies in target2