]> andersk Git - moira.git/commitdiff
Shorten program name
authorprobe <probe>
Tue, 2 Jun 1992 16:54:43 +0000 (16:54 +0000)
committerprobe <probe>
Tue, 2 Jun 1992 16:54:43 +0000 (16:54 +0000)
Only tack on \n for the printout; do not put it in the buffer that may
be used by the critical_alert() routine.

incremental/afs.c

index 00ed20c05f07373f2a75eeb0bbccd1c4c08c7c2a..490d7a09a28e701bd67a8a12957d04c4c142b291 100644 (file)
@@ -43,9 +43,11 @@ int argc;
     before = &argv[4];
     afterc = atoi(argv[3]);
     after = &argv[4 + beforec];
-    whoami = argv[0];
 
-    sprintf(buf, "%s (", table);
+    whoami = (whoami = rindex(argv[0], '/') ? ++whoami : argv[0]);
+
+    strcpy(buf, table);
+    strcat(buf, " (");
     for (i = 0; i < beforec; i++) {
        if (i > 0)
          strcat(buf, ",");
@@ -57,9 +59,8 @@ int argc;
          strcat(buf, ",");
        strcat(buf, after[i]);
     }
-    strcat(buf, ")\n");
 #ifdef DEBUG
-    write(1,buf,strlen(buf));
+    printf("%s\n", buf);
 #endif
 
     initialize_sms_error_table();
This page took 0.200443 seconds and 5 git commands to generate.